Mission Instructions

Your mission is to create a robot that can explore remote, narrow canyons. First, you will create a sample canyon system with both a left and right turn. Then you will design, test, and refine your robot until it can navigate the canyon system independently.

9. Code: Wrapping Up

Turning Away

The last part of your code answers the question: what should the robot do when it can’t drive forward and can’t turn towards the side-facing sensor?

Answer: Turn away!

Add this command into your code and it will be time to test your robot!


Exiting the Canyon

Here’s a little philosophical question to ponder. How will the robot be made aware when it has actually exited the canyon system? There will be room to move forward, and to turn left, and to turn right. What will your robot end up doing? 

You don’t need to code anything here but you might need to use the stop button once your robot has left the canyon system.