Yahboom Omibox Robot Kit Expand Course 4.11 Infrared avoid
1-1. The position of the Infrared sensor in the robot car
1-2. Learn to understand the principle of Infrared follow
1-3. Learn how to use Infrared avoid sensor graphically program building blocks
As shown in the above picture, We circled the Infrared avoid sensor with two red wire frame. We can control them by programming.
In this lesson we will learn how to complete the infrared avoid function of the robot car by programming.
The basic principle of the infrared sensor is to use the reflective nature of the object. When there is no obstacle in the front side, the infrared light emitted by the infrared sensor launching tube will gradually weaken due to the farther distance of the propagation, and finally disappear.
When there is an obstacle on the front side, the infrared light will be reflected to the receiving tube of the sensor.
We write the corresponding code according to this point to complete the robot infrared follow function.
4.Search for blocks
The following is the location of the building blocks required for this programming.
5. Combine blocks
The summary program is shown below:
After the program is uploaded, open the power of the Omibox. It will advance and automatically avoid obstacles when encountering obstacles.
!!!Note:In order to avoid the interference of sunlight on the infrared light, the experiment must be carried out indoors.
The code of the experiment: 11.Infrared avoid.rar