Chapter 7: Navigating with Infrared Headlights
· Page 261
NEXT
Your Turn
You can experiment with setting different
pulseLeft
,
pulseRight
, and
pulseCount
values inside the
IF…THEN
statement. For example, if the Boe-Bot doesn’t turn as far, it
may actually track the edge of the electrical tape delimited course. Pivoting backward
instead of rotating in place may also lead to some interesting behaviors.
√
Modify AvoidTableEdge.bs2 so that it follows the edge of the electrical tape
delimited course by adjusting the
pulseCount
values so that the Boe-Bot
doesn’t turn too far away from the edge.
√
Experiment with pivoting as a way to make the Boe-Bot roam inside the
perimeter instead of following the edge.