Case 20: The Smart Airer
Purpose
To make a smart arier.
Link:
Materials Required
Video link: https://youtu.be/ZjROexNQT1I
Bricks build-up
Installation Mthods of Hardwares
Install the water level sensor with the bricks.
Hardware Connection
Connect two motors to M1 and M2, the servo to S1 and the water level sensor to P1 ports on Wukong breakout board.
Software Platform
Coding
Add extensions
Click "Advanced" in the MakeCode to see more choices.
Search with Wukong in the dialogue box to download it.
Program
Link:https://makecode.microbit.org/_diR3FMErAfWF
Result
when button A is pressed, the two windows open outward and the airer extends outward. When button B is pressed, the airer retracts inward and the two windows close inward. When button A is pressed, the two windows open outward and the airer extends outward, the water level sensor will detect the current rain value, and when the rain value is greater than 10, the airer will automatically retract and the two windows will automatically close.