O'Reilly logo

Building Smart LEGO MINDSTORMS EV3 Robots by Kyle Markland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required