8.f. Improving the Maze-Solving Code
We have gone over the most important parts of the code; the other bits and pieces (like the function
display_path()
, the start-up sequence and calibration, etc.) can be found with everything else in the
folder
examples\atmegaxx8\3pi-mazesolver
. After you have the code working and you understand it
well, you should try to improve your robot to be as fast as possible. There are many things you can do
to try to make it better:
• Increasing the line-following speed.
• Improving the line-following PID constants.
• Increasing turning speed.
• Identifying situations where the robot has gotten lost.
• Adjusting the speed based on what is coming up; e.g. driving straight through an ‘S’ at full
speed.
The following video shows a 3pi prototype—it only has one blue power LED, but it is otherwise
functionally identical to the final version—that we programmed to compete in LVBots Challenge 4.0.
The code is more advanced (and complicated) than the sample maze-solving code we have just
provided. Improvements over the sample program include a higher base running speed with better-
tuned line-following PID constants, faster and smoother turns, and increased speed on long straight
segments.
Pololu 3pi Robot User’s Guide
© 2001–2019 Pololu Corporation
8. Example Project #2: Maze Solving
Page 51 of 85
Содержание 0J5840
Страница 24: ...Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 5 How Your 3pi Works Page 24 of 85...
Страница 67: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 67 of 85...
Страница 77: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 77 of 85...