Tune Kp, Ki, Kd and watch the line position chase the target. Same math as the Arduino firmware: edge boost, trapezoidal integrator with anti-windup, and a filtered derivative on measurement.
Route
IR sensors
0.005
max
0.001
max
0.000
max
- Error
- 0
- P
- 0
- I
- 0
- D
- 0
- Correction
- 0
- State
- idle
Target (line the robot should sit on)
Actual sensed position