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

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

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