Keyestudio Micro:bit Mini Smart Robot Car Manual page 69

Table of Contents

Advertisement

www.keyestudio.com
2) Programming Thinking
At first, use a ultrasonic module to measure the distance between the micro:bit car and an obstacle
1
ahead.
When the measured distance is less than 10cm, the micro:bit car stops for 0.2 second, then turns left for
2
0.5 second and then goes forward. If the measured distance is greater than or equal to 10cm, the micro:bit car
will directly go forward.
3) Test Code
51

Advertisement

Table of Contents
loading

Table of Contents