User Manual

48
to the detection results of the probes. If the line in front of the car is detected as a small curve,
then the car will turn a small angle; if it is a big one, the car will turn a large angle. Thus, here
we set four angle-turning constants: a_step, b_step, c_step, and d_step.
When the car moves forward originally, the servo is in 90 degrees. To drive the car to turn left, the
servo should be in 90+step degrees; to turn right, the servo should be in 90-step degrees.
There is a special case: if the car runs off the track, and all the probes cannot detect the black
lines any more, then it will continue the program below.
In some case, especially when the car turns in a direction when the semidiameter of the curve is
very small (1), the car may run out of the track and cannot detect any black line (2). If there is no
response program in such case, the car will be unable to follow the line again. Thus we set the
In the middle
Small angle
Medium angle
Large angle
Micro angle