10. Project 5: Smart Environment (temperature control)¶
Level:
10.1. Part List:¶
Temperature Sensor X1 (placed on Multiple Sensors for plant)
Motor Fan X1
Multiple Sensors for plant X1
Multiple Actuators for plant X1
Connecting Wire X1
micro:bit X1
USB Cable X1
10.2. Description:¶
In project 5, you can learn how to make a fan automation that allows you to control the ambient temperature.
10.3. Steps:¶
Basic (Add block on start) > Plant (Add block Initialize Smarthon multiple-sensor)
Basic (Add block forever) > Logic (Add block if…then…else, add 1 more if…then…else) > For 1st if : Logic (Add block “ ” and “ ”, 1st “ ” : Add block 0 = 0, change “0” to Plant “Get temperature(°C)”; “=” to “>”; “0” to “27” ; 2nd “ ” : Add block 0 = 0, change “0” to Plant “Get temperature(°C)”; “=” to “<”; “0” to “32”)
For then: Plant-More (Add block Set Motor fan clockwisely to intensity 0, change “0” to “500” )
For else if: Logic (Add block 0 = 0, change “0” to Plant “Get temperature(°C)”; “=” to “>”; “0” to “32” ) > For then: Plant-More (Add block Set Motor fan clockwisely to intensity 0, change “0” to “1023” )
For else: Plant-More (Add block Set Motor fan clockwisely to intensity 0)
10.4. Hardware:¶
Connect Multiple Sensors and Multiple Actuators by connecting wire
Connect Motor fan to Motor Fan (D11/P14; D10/P13) port of Multiple Actuators
Download the code and transfer to micro:bit
Plug the micro:bit into Multiple Sensors
10.5. Experiment:¶
How does temperature affect plant growth?
Does temperature affect seed growth?
Does motor fan affect plant transpiration rates?