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

Configuring the switch cases

We have a switch with the correct number of cases, but we need to set up each case. For each case, we will do two things: first, we need to define the combination of buttons that will activate that case, then we will need to write the code that we want the EV3 to execute when that case is active.

Though this RC program is fairly straightforward, this is where the program can become monotonous and confusing. We have 10 cases to program, so writing this program will get pretty repetitive. Not to worry though, because soon you will have a working RC program!

The first case to set up is our default nothing case. This case will execute when none of the remote buttons are pressed and it will stop all of the robot's ...

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