Page 284 · Robotics with the Boe-Bot
The next two lines of code implement the proportional control calculations for each
servo.
' Calculate proportional output.
pulseLeft =
pulseRight = SetPoint - distanceRight * Kpr + CenterPulse
Now that the
pulseLeft
subroutine can be called.
GOSUB Send_Pulse
The
portion of the
LOOP
following the
at the beginning of the main loop.
DO
LOOP
Your Turn
Figure 8-6 shows a lead Boe-Bot followed by a shadow Boe-Bot. The lead Boe-Bot is
running a modified version of FastIrRoaming.bs2, and the shadow Boe-Bot is running
FollowingBoeBot.bs2. Proportional control makes the shadow Boe-Bot a very faithful
follower. One lead Boe-Bot can string along a chain of 6 or 7 shadow Boe-Bots. Just
add the lead Boe-Bot's side panels and tailgate to the rest of the shadow Boe-Bots in the
chain.
SetPoint - distanceLeft
and
calculations are done, the
pulseRight
sends the program back to the command immediately
DO...LOOP
* Kpl + CenterPulse
Send_Pulse
Need help?
Do you have a question about the Boe-Bot and is the answer not in the manual?
Questions and answers