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 ...
Get The Art of LEGO MINDSTORMS NXT-G Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.