Lesson 2-5 · Proportional Control — Knowledge ChecksAnswer key
What does `arcade(0.3, -0.15)` do?
The speed is positive, so it drives forward. The turn is negative, so the left wheel speeds up and the right slows down, and the robot curves 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.
What is 120 % 50, and would a print inside `if i % 50 == 0:` happen on pass 120?
50 goes into 120 twice (100) with 20 left over, so 120 % 50 is 20. Only passes whose remainder is 0 — multiples of 50 — print.