Returning the steering to center

The final MyBlock is crucial to the car steering program. This MyBlock returns the steering mechanism to the center position regardless of what position it is currently in. This automatic return-to-center is a signature feature of the Falcon's programming.

This MyBlock starts by checking the position of the steering motor A. To be more specific, it actually first checks to see if the motor is in the left position; if this check returns false, then it checks to see if the motor is in the right position. If this returns false too, then the steering is already centered and no action is necessary.

The MyBlock first checks to see if the wheels are turned to the left (positive direction) by testing whether or ...

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.