Mission Instructions

2. Build Your Robot

Attach one distance sensor to the I2C port and the other to an AD Port. 

STOP AND THINK. 

Where should the distance sensors be placed on your robot? 

We definitely want the robot to notice a wall in front of it, so place one distance sensor facing forward. Now where should the second sensor go?

There’s an algorithm in maze-solving known as the left hand rule or wall-follower algorithm. To get out of any canyon system, simply place one hand on the left-hand side of the hallway and follow that wall until you reach the exit. Of course, the left hand rule takes a long time, and requires you to go through every dead-end in the canyon system, but it does work! (This works equally well if you choose to use your right hand, but you cannot switch hands in the middle of your maze-solving.)

We recommend you place the second distance sensor facing one side: your choice whether it’s the left or right! (Our sample code will have a distance sensor facing the left)

You might want to run a few tests to determine where on the robot the side sensor should be placed. Should it be near the front, over the wheels, or near the back of the robot?