6. Project 1: Read Sensors on micro:bit 25 LED lights¶
Level:
6.1. Part List¶
Temperature/Humidity Sensor X1
Multiple Sensors for smart house X1
Multiple Actuators for smart house X1
Connecting Wire X1
micro:bit X1
USB Cable X1
6.2. Description¶
You can learn how to get the value of the sensor and show on micro:bit LED. Temperature/Humidity sensor will be illustrated in this demo.
6.3. Steps¶
Basic (Add block on start) > House (Add block Initialize Smarthon multiple-sensor)
Input (Add block on button A is pressed) > Basic (Add block show number) > House (Add block Get temperature (°C))
Input (Add block on button A is pressed, change “A” into “B” ) > Basic (Add block show number) > House (Add block Get humidity)
6.4. Hardware¶
Connect the Temperature/Humidity sensor to Temperature Sensor port of Multiple Sensors
Download the code and transfer to micro:bit
Plug the micro:bit into Multiple Sensors
Pressed micro:bit button A to see the temperature and button B to see the humidity * Try to show the other sensors value on micro:bit LED.