Proportional steering

The EV3 infrared sensor measures a beacon heading value from -25 to +25. A heading value of 0 indicates that the beacon is directly in front of the sensor. A positive value indicates that the beacon is to the right of the sensor, and a negative value indicates that the beacon is to the left. The magnitude of the heading value indicates how far the beacon is from the center. For example, a heading value of 5 means that the beacon is slightly to the right of the sensor, while a value of 23 would indicate that the beacon is far to the right of the sensor. The program will use both direction and magnitude to adjust its steering. This is called a proportional beacon follower, and it enables the robot to make smooth driving ...

Get Building Smart LEGO MINDSTORMS EV3 Robots 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.