Welcome to Building:bit Superkit repository
3.7 Temperature control fan
1. Learning target
In this course, we will learn how to use Micro:bit and temperature and humidity sensor and key module to make a temperature control fan.
2. Preparation
Connect the module to Micro:bit board by expansion board, as shown below.
Note: The building block parts used in this course needs to be purchased additionally.
Link:https://category.yahboom.net/products/buildingbit-super-kit
3.Programming method
Mode 1 online programming: First, we need to connect the micro:bit to the computer by USB cable. The computer will pop up a USB flash drive and click on the URL in the USB flash drive: http://microbit.org/ to enter the programming interface. Add the Yahboom package https://github.com/YahboomTechnology/SuperBitLibV2 to program.
Mode 2 offline programming: We need to open the offline programming software. After the installation is complete, enter the programming interface, click【New Project】, add Yahboom package: https://github.com/YahboomTechnology/SuperBitLibV2, you can start programming.
4.Looking for blocks
The following is the location of the building blocks required for this programming.
5.Combine block
The summary program is shown below.
5. Phenomenon
After the program is downloaded successfully.
If you hold the temperature and humidity module in your hand and keep it warm, when the temperature rises to more than 31℃, Micro:bit dot matrix displays 1, and the fan starts to shake its head. If the temperature drops below 30℃, Micro:bit dot matrix displays 0, and the fan stops.