Example Code for MakeCode-Physical Quantity Data

Use MakeCode to retrieve physical quantity data from the SCI DAQ module. Users can learn how to integrate the module with micro:bit using block-based programming.

Hardware Preparation

  • micro:bit V1/V2
  • SCI DAQ Module
  • Supported sensor (e.g., SEN0334 Temperature & Humidity Sensor)
  • Connection cables

Software Preparation

Wiring Diagram

  • Connect the SCI DAQ module to micro:bit via I2C.

Other Preparation Work

  • Create a new MakeCode project and load the extension library.

Sample Code

  • Open MakeCode, create a new project, add the extension, and use blocks to retrieve physical quantity data (e.g., "Temp_Air").

Result

  • The micro:bit can display or transmit the retrieved sensor data (e.g., temperature, humidity).

Additional Information

  • The physical quantity name can be obtained from the module screen or the "Supported Sensor List".

Was this article helpful?

TOP