EasyManua.ls Logo

Keyestudio Micro:bit Mini Smart Robot Car V2 - Page 98

Keyestudio Micro:bit Mini Smart Robot Car V2
184 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...
72
1 Set the KEYES-2812-18R module to turn on 18 RGB LEDs in various colors. When micro:bit robot moves
forward, 18 RGB LEDs turn on blue light; robot moves backward, 18 RGB LEDs turn on purple light; robot stops,
18 RGB LEDs turn on red light.
2 Measure the distance between the robot and obstacles using an ultrasonic sensor.
3 When the measured distance is greater than or equal to 10cm, the micro:bit robot moves forward; if
less than or equal to 6cm, robot will move backward; if greater than 6cm but less than 10cm, or greater than
30cm, robot will stop.
Source Code

Related product manuals