Setpoint for line tracking

We first need to determine the desired setpoint of the Light Sensor reading for the robot to track on. When using only one sensor, we don't want to track the middle of the line because small changes in position will not be sensed. If we track along the edge of a line, then a small change in position will substantially affect the size of the correction error in our algorithm. In this case, 50 percent of the circle of red light will have a high reflectivity and 50 percent will have a low reflectivity. Small deviations from the edge will result in huge changes in the measured intensity. Placing the middle of the circle of light exactly on the edge can be a challenge. Since we are trying to obtain a numerical value, it is ...

Get Learning LEGO MINDSTORMS EV3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.