Let's try this new robot game, robot tracking. We first use black tape to paste a circle on the white ground (also on white paper), and the robot will continue to patrol along the circle. Let's try the kids together.
Figure 1-1 tracking black line
Figure 1-2 tracking module
The basic principle of infrared sensors is to take advantage of the reflective properties of the object. This experiment is traveling on the black line. When the infrared emission is on the black line, it will be absorbed by the black line, and the materials emitted to the other colors will be reflected on the infrared receiver. When the car's patrol module detects the black line, the indicator light is on. When the white object is detected, the indicator lights go out. We write the corresponding code according to this difference to complete the car patrol line function.
● 1 X USB cable
● 1 X micro:bit robot
Then the micro:bit is connected to the computer through USB, and the computer will pop up a U disk and click the URL in the U disk to enter the programming interface. Input this URL https://github.com/lzty634158/yahboom_mbit_en to get the package.
4.Search for blocks
The code of the experiment: Lesson 5 Tracking.rar