Programming the GUI

We will start the program the same way we have started every program so far: with an infinite loop that encloses the rest of the program.

Then, add in some code to start making the GUI. These first few blocks are for initialization. The blocks, in order, do the following—clear the EV3 display, print the custom menu to the display, stop all of the motors, then set the brick LED to blink green. The Timmyton makes extensive use of the brick LED to add an extra dimension to the user-robot interaction:

After the initialization code, insert a switch block. Change its mode to Brick Buttons | Measure | Brick Buttons. Make sure ...

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.