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

Writing the program

Now that all five of the MyBlocks are finished, it is time to put them together to make the navigation program:

The first thing we need to do is define some variables. Create a new logic variable (set the mode to Write | Logic) and name it exit. Set its starting value to false. This variable's value changes to true when the GPS Car reaches its destination; this stops the navigation loop and ends the program:

We need two more numeric variables named destLat and destLong. You will use these variables to set the destination ...

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