Welcome to Tiny:bit Pro repository
7.1 IR Control
!!!Notes about Infrared Remote Control
Since there are always some problems with the infrared expansion package, and Microbit has not solved this problem.
Case1: If you are using the Microbit V1 board, please use the hex file provided by us directly, and do not open the hex file in the MakeCode graphical programming interface, otherwise it will cause some errors, and the infrared remote control function cannot be realized.
Case2: If you are using a Microbit V2 board, you can use this expansion pack. https://github.com/YahboomTechnology/Yahboom_IR_V2
Note:
1) This experiment needs to be done indoors to reduce the interference of sunlight on the infrared receiver.
2) Before using the infrared remote control, you need to remove the plastic piece at the rear of the remote controller.
3) During use, the infrared remote controller needs to point to the infrared receiver head directly in front of the car.
1.Preparation
1-1.The position of the Infrared receiver motor on the robot car
1-2.Learn how to use infrared remote controller
As shown on the left figure, the infrared receiver on the robot circled by the red wire frame.
As shown on the right figure, infrared remote controller.


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/Tiny-bitLib 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/Tiny-bitLib you can programming.
2.Learning goal
2-1. Learn about using infrared remote control graphically programming blocks
2-2. The following functions are controlled by the infrared remote controller.

3.Search for block
The following is the location of the building blocks required for this programming.




4.Combine block
The summary program is shown below:


5.Experimental phenomena
After the program is downloaded, we can control the robot car by infrared remote controller.
The corresponding functions of the infrared remote control are shown in the figure below.
