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

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.