Hungry mode

This mode is a review of the Hungry mode we programmed for the Timmyton in the last chapter, as it is fairly similar. The code for this mode will go inside the true case of the color sensor switch.

The first few blocks will initialize the operating mode. Add a display block that prints Hungry Mode to the EV3 screen, a brick LED block that shuts the LED's off, and a switch (Color Sensor | Measure | Color, port 3). After the switch, place a move tank block that turns motors B and C off:

But wait, what is that blue block after the display block? That is a comment. What does it do? Nothing! That's right. Comments are a way for a programmer ...

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.