Robotics

Making Decisions

Combining a sensor with an if statement lets your robot react differently depending on what it finds: if (robot.senseWall()) { /* do one thing */ } else { /* do another */ }.

Your turn

Open the Robotics Lab and solve "Think Twice" — sense the wall, then choose which way to turn.

Open Robotics Lab
Ask JARVIS for a hint