Skip to content
AiX
AiX Academy
Build log

Inside the line-follower rebuild

18 July 2026 · AlgoAtWork Robotics Academy

When Cohort 07 first raced their line-followers, the fastest lap was 14.2 seconds — respectable, but the robots wobbled through every corner like they were unsure of the ground. The class decided that was not good enough, and the rebuild began.

The first fix was boring and decisive: sensor height. Half the class had mounted their reflectance arrays too high, which flattens the contrast between line and floor. Dropping the arrays to 4 mm doubled the usable signal before a single line of code changed.

Then came the control loop. The stock examples run their PID at whatever speed the loop happens to spin — which changes every time you add a print statement. We restructured the firmware around a timer interrupt at a fixed 100 Hz, so the derivative term finally meant something. Tuning went from guesswork to method: raise P until it oscillates, add D until it calms, leave I alone unless the track drifts.

Race two: 12.1 seconds, cornering flat. More important than the stopwatch — every builder in the cohort can now explain why their robot behaves the way it does. That is the difference between following instructions and engineering.