Welcome to Building:bit Superkit repository
2.6Human body infrared detection broadcast
Human body infrared detection broadcast
Human body infrared detection broadcast1. Learning objectives2. Sensor wiring3. Programming3.1 Add expansion package3.2 Building blocks used3.3 Combining blocks4. Experimental phenomenon
1. Learning objectives
In this course, we mainly learn how to use MakeCode graphical programming to realize the display of human infrared detection broadcast function.
2. Sensor wiring
The human infrared sensing module is connected to the P1P2 interface.

3. Programming
Method 1 Online programming:
First, connect micro:bit to the computer via a USB data cable. The computer will pop up a U disk. Click the URL in the U disk: https://makecode.microbit.org/ to enter the programming interface. Then, add the Yahboom software package https://github.com/YahboomTechnology/SuperBitLibV2 to start programming.
Method 2 Offline programming:
Open the offline programming software MakeCode and enter the programming interface. Click [New] and add the Yahboom software package https://github.com/YahboomTechnology/SuperBitLibV2 to start programming.
3.1 Add expansion package


3.2 Building blocks used
The location of the building blocks required for this programming is shown in the figure below.



3.3 Combining blocks
The summary program is shown in the figure below.

You can also directly open the Human-body-infrared-detection-broadcast.hex file provided in this experiment and drag it into the browser that opens the URL, and the program diagram of this project source code will be automatically opened
4. Experimental phenomenon
After turning on the computer, wait for a few seconds to initialize. After the dot matrix displays 0, the program runs successfully. When the human infrared detects someone, the dot matrix displays 1 and then plays jump up music, otherwise it displays 0.