Line Following Vocabulary
Word Bank
| ColorSensor | reflection | threshold |
| proportional control | GAIN | deviation |
| edge | calibration | while loop |
| BLACK | WHITE | sensor data |
Fill In the Blanks
- The reads how much light bounces back off the floor.
- is that amount of light, as a number from 0 to 100.
- Black tape reflects a number; white floor reflects a high number.
- The is the midpoint between the BLACK and WHITE readings.
- How far the reading is from the threshold is called the .
- Steering in proportion to how far off you are is called .
- The decides how hard the robot steers — too low is sloppy, too high is wobbly.
- 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
GAINbigger 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: