The image below shows when the right line following sensor (when it is above
black_line_R - 100
) sees a dark
black line. The motors turn on and tries to move toward the line on the right. Note that the left line following sensor
stays around the same value but becomes noisy.
Straight Line Following micro:bot
Once you have loaded your script, place your robot on a dark black line on a light / white background. Make sure
you have it centered with the line just underneath the center line sensor. Make sure the motor switch is changed
from "STOP MOTORS" to "RUN MOTORS" and press the B button to start.
Stop Motors
Run Motors
Your robot should drive forward until one of the side line sensors detects the dark black line and then it will turn in
that direction to correct itself. Depending on your line shape and thickness your robot may "waddle" more or less.
If you have the motors running too fast, it will continue moving until it sees a light surface. Make sure to have the
robot slowly move forward or it may fall of the edge of a table!
b k
b k