Week+6+-+Stay+away+from+the+edge


 * REMEMBER:** A robot must ** sense ** its environment, have a **plan** of how to react to its environment, and **act**.

=Stay Away From the Edge=

**Overview:** Another challenge the robot might face is the safe navigation along a ridge line. Get too close and over you go! NASA has asked that you prove your robot is capable of staying away from the edge of a cliff.

Build a light sensor and attach it to the robot (see Week 1 - Build DomaBot)

We will need to take some readings to determine what values your robot reads for the table and the edge of the table.

1. Click **View** 2. Scroll to the right and click **reflected light**. 3. Scroll to the right and click **Port 3** (this is the port your light sensor is attached to). 4. Place the robot on the desk to find the value of the desk. Write the number on the worksheet 8. 5. Place the robot at the edge of the table so the light sensor hangs over the edge. Write the value you get on your worksheet. 6. What is your threshold? //(Hint: the threshold is a number half way between the value for the desk and the value over the edge of the desk)//. Write this number on worksheet 8.
 * To do this, click on: **

Task
media type="custom" key="12467750"
 * 1) Drive forward until the edge is the detected then stop.
 * 2) Shout "whoops!" when you get to the edge.
 * 3) Turn around when you reach the edge.
 * 4) Repeat this action staying from the edge of the chasm.