Another example is a T-intersection with a dead end on the left: ‘LBS’. The turns are 90° left, 180°,
and 0°, for a total of 90° right. The sequence should be replaced with a single ‘R’.
In fact, whenever we have a sequence like ‘xBx’, we can replace all three turns with a turn
corresponding to the total angle, eliminating the U-turn and speeding up our solution. Here’s the code
to handle this:
Pololu 3pi Robot User’s Guide
© 2001–2019 Pololu Corporation
8. Example Project #2: Maze Solving
Page 45 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...