That is why the micro:bit car can automatically follow the black track, achieving the automatic line tracking
function.
Programming Thinking
1 Set the KEYES-2812-18R module to turn on 18 RGB LEDs in various colors.
2 Judge white and black line by both side line tracking sensors.
3 If right side tracking sensor detects black line, robot turns right; if left side tracking sensor detects black
line, turn left; if both side sensors don’t detect black line, stop; if both side sensors detect black line, go forward.
Source Code