Following the Line
Links and useful resources
Follow the line
Our basic line-following process looks like this:
- If the middle sensor sees the line, go straight
- If the left sensor sees the line, spin in place to the left until the middle sensor sees it
- If the right sensor sees the line, spin in place to the right until the middle sensor sees it
This works, but it's very inefficient in terms of motion speed. How could we do better?
- As long as one side sensor is detecting the line, we're not that far off. Maybe we can just veer to that side while still moving forward.
- Adjust the inside wheel speed down, or the outside wheel speed up, and continue
- If we lose the line entirely, it's time to spin toward the last side that saw it.