Module 2 · Line Tracking
Lesson 5 · Proportional Control — Knowledge ChecksAnswer key
With base speed 0.3, what does `arcade(0.3, 0.15)` set the two motors to?
arcade adds turn to the left motor and subtracts it from the right: 0.3 + 0.15 = 0.45 left, 0.3 − 0.15 = 0.15 right.
Setpoint is 0.5 and the sensor reads 0.2. What is the error?
error = 0.5 − 0.2 = +0.3. The positive sign says the robot drifted onto white and should steer toward the line.
If Kp = 0.6 and error = 0.3, what is the correction?
correction = error × Kp = 0.3 × 0.6 = 0.18.
Your robot follows the line but weaves back and forth rapidly, never settling. What should you do to Kp?
Rapid weaving is over-correction — Kp is too high. Lower it for gentler, smoother steering.