I started looking at the design for line following by accident, thinking it was a good beginner project. Then I found out that it is really a tough challenge for beginners.
It requires some insight into ‘feedback control’ to do it right. When I looked on the net and didn’t find any explanations that I liked, I decided to add a ‘Line Following Introduction’ to the bonus topics.
That piece shows how to setup the sensor and provides a coding example for a ‘bang-bang’ control to follow the edge of a line.
Naturally this effort led me to thinking about how to improve the design and an assignment topic: ‘Line Following Development’ which describes a ‘proportional’ control method, and has lots of suggested experiments and measurements to be performed, along with another coding example.
I hope you like it.