Line Following Vocabulary

Word Bank

ColorSensor reflection threshold
proportional control GAIN deviation
edge calibration while loop
BLACK WHITE sensor data

Fill In the Blanks

  1. The reads how much light bounces back off the floor.
  2. is that amount of light, as a number from 0 to 100.
  3. Black tape reflects a number; white floor reflects a high number.
  4. The is the midpoint between the BLACK and WHITE readings.
  5. How far the reading is from the threshold is called the .
  6. Steering in proportion to how far off you are is called .
  7. The decides how hard the robot steers — too low is sloppy, too high is wobbly.
  8. The robot follows the of the line, not the center, so a small wobble is normal.

Quick Checks

  • Circle what line_sensor.reflection() returns:
    a color / a number 0-100 / a distance in mm

  • Over black tape, is the reflection reading high or low?
    Circle one: high / low

  • Your robot wobbles back and forth along the line. Should you make GAIN bigger or smaller?
    Circle one: bigger / smaller

  • Put these calibration steps in order (number them 1-3):
    Compute the threshold (midpoint)
    Read reflection on the black tape
    Read reflection on the white floor

Stretch: Read the Code

What does this loop make the robot do? Write it in plain words.

while True:
    deviation = line_sensor.reflection() - threshold
    robot.drive(DRIVE_SPEED, GAIN * deviation)
    wait(10)

It will: