Welcome to Human Body Infrared Module repository
Welcome device
Welcome device
1. Purpose
In this lesson, we will learn how to use micro:bit to drive the speech synthesis module and human body infrared module to realize the English broadcast function.
2. 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/Speech to start programming.
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/Speech, you can start programming.
3. About wiring


Note: As shown in the figure below, we use the micro:bit alligator clip expansion board.
4. Combine building blocks
We need to use the following programming building blocks.



We judge whether the human body is detected by reading the analog value of P1 pin. When the analog value of the P1 pin is greater than 500, it is determined that a human body has been detected.
The summary program is shown below.

5. Experimental phenomenon
After the program is downloaded successfully, the dot matrix shows a face expression.
When a person approaches the human body infrared module, speech synthesis module will play “Hello welcome to Yahboom”.
