Users Manual
CLASS 3
98
Coding the Line Tracer
Coding the line tracer. Do you remember the line follower model you learned earlier? Now, use two infrared
sensors to code the line tracer on the black line. Each infrared sensor can tell if the car is on line or not. The
program will use the following logic to move the car along the line.
1. If the left infrared sensor is on the black line
and the right infrared sensor is not on the black
line, we will activate the right motor and turn it
to the left.
2. If the left infrared sensor is not on the black
line and the right infrared sensor is on the black
line, it will turn the left motor to the right.
Activity