Hi, in this project we will use the microbit to make a system that can remotely monitor the light value and remotely control the lights in the home. Its principle is very simple, we only need to connect the microbit to WiFi and upload the light value in the room to the KidsIot platform, we can remotely monitor the light value in the home through the KidsIot platform, and use the remote control button in the KidsIot to control the light switch in our home.
Materials required
IoT:bit : Internet WIFI extension board for micro:bit x 1
Octopus Single RGB Rainbow LED x 1
Go to MakeCode: (makecode.microbit.org/)
Reference in this program: https://www.elecfreaks.com/learn-en/microbitKit/iot_kit/how_to_use_kidsiot.html
Code:
Link:
Result:
Connect WIFI when on start. Continuously judge if the WIFI is connected successfully, if yes, a tick will be shown. Continuously judge if the connection to KidsIoT is ready, if yes, a small icon will be shown or it continues connecting. Continuously judge if the connection to KidsIoT is a success, if yes, the data (given by the light sensor connected to P1) will be uploaded. If the switch of the platform is on, it plays a music of “Power Up”. If the switch of the platform is off, it plays a music of “Power Down”
If you have any ideas or opinions, please feel free to contact us via [email protected].