Follow+the+Guidelines

(back) Source: []

**__Calculating a__ __Threshold__** The light sensor gives a number value to the amount of light it detects. To calculate a threshold value between two surfaces, hold the light sensor over both surfaces and write down the numbers each surface produces. Then add the two numbers together and divide by two.
 * __(Value for light surface) + (Value for dark surface)__ = Threshold Number ||
 * Divided by 2 ||

**__Worksheet: Follow the Guidelines__** Introduction to Mobile Robotics > Follow the Guidelines This worksheet is provided for reference only. Be sure that you follow the steps in the online directions, and answer the questions at the appropriate times. Fill out all your answers on a separate sheet of paper.

Construct: What is Line Tracking? Check your understanding: 1. What is the robot looking for?

2. Which way should it go when it sees light? Why? 3. Which way should it go when it sees dark? Why? **__Construct__**: Find the Threshold Record and check: 4. Record the threshold value you calculated. Lighter surface light value = ... Darker surface light value = ...

5. Classify each of the following light sensor values as “light” or “dark,” using the threshold value you calculated for your light sensor. i. 34

ii. 78 iii. 51 iv. 40 __**Construct**__: Create your Program Check your understanding: 6. Sketch either a filled sun (light) or an empty sun (dark) to show which half of the Switch block the program will run for each of the following values (if the Switch Block threshold is 45). i. 91

ii. 36 iii. 5 iv. 20

**__Construc__**t: Control the Motors Check your understanding:

7. Using your own calculated threshold, describe the motion that the robot will make when the light sensor reads: i. 27

ii. 38 iii. 91 iv. 45 **__Contemplate__** 8. T he line tracking behavior is built by organizing several smaller behaviors to run at

certain times. Identify two of these smaller behaviors, and explain what they do in the program and when they are used. 9.  Mele writes this program one afternoon, tests it, and finds that it tracks a line well. However, when she comes back the next morning, it doesn’t work! She places her robot on the line and runs the program, but to her surprise, the robot only swingturns to the right in a circle the whole time. Explain what the cause of this problem is, your reasoning for why this is the case, and what needs to be done to fix it. If you don’t have any idea what could be wrong, explain instead what steps you would take to help Mele find and fix the issue. For each step, explain how and why you would take that step. 10.  Imagine that instead of dark tape on a light surface, your classroom has dark surfaces with light tape on them. i. Would the robot be able to follow the line using your same program? ii. Would it behave exactly the same, or slightly differently? Explain. 11.  Now think about the physical placement of your light sensor on the robot. i. Is the placement of the light sensor important? ii. What happens if you raise or lower the light sensor? iii. What happens if you place it in the rear of the robot instead of the front, but don’t change your program? Continue: The Flip Side Answer the following: 12.  Why does this behavior track the right side of the line instead of the left? 13. When might this behavior be useful?