EasyManua.ls Logo

Keyestudio Micro:bit Mini Smart Robot Car - Ultrasonic and Infrared Avoiding Obstacles

Keyestudio Micro:bit Mini Smart Robot Car
132 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
67
www.keyestudio.com
8.7 Ultrasonic and Infrared Avoiding Obstacles
1) Description
In the previous sections, we have introduced ultrasonic obstacle avoiding car and infrared obstacle avoiding car.
To be more accurate, this lesson we combine both ultrasonic module and infrared obstacle detector sensors to
build an obstacle avoiding car.
2) Programming Thinking
1 When the distance between the car and front obstacle is less than or equal to 10cm, the robot car will
stop, passive buzzer beeps for 0.5 second, mini car will go backward for 0.2 second, and then turn left for 0.3
second.
2 When the distance between the car and front obstacle is greater than 10cm, use two infrared obstacle
detector modules on the car shield to detect whether there is obstacles on the front left or on the front right.

Related product manuals