improving the control algorithm
The part of a line-follower program that adjusts the steering based on the Light Sensor reading is called a control algorithm. Improving the control algorithm will allow the TriBot to move faster and follow lines with tighter turns.
The control algorithm you’ve been using so far is called a three-state controller, because the program will do one of three things based on the light sensor reading: go straight, turn left, or turn right. This approach works as long as the TriBot moves slowly and the line doesn’t curve too quickly. The main problem with this method is that when the robot needs to turn, it always turns the same amount, because the Steering values for the Move blocks are hard-coded. If the robot encounters ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access