EasyManuals Logo

Parallax Boe-Bot User Manual

Parallax Boe-Bot
360 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #272 background imageLoading...
Page #272 background image
Page 258 · Robotics with the Boe-Bot
A second feature of a program for turning away from drop-offs is adjustable distance.
You may want your Boe-Bot to only take one pulse forward between checking the
detectors, but as soon as a drop-off is detected, you may want your Boe-Bot to take
several pulses worth of turn before checking the detectors again.
Just because you are taking multiple pulses in an evasive maneuver, it doesn’t mean you
have to return to whiskers-style navigation. Instead, you can add a
pulseCount variable
that you can use to set to the number of pulses to deliver for a maneuver. The
PULSOUT
command can be placed inside a
FOR…NEXT loop that executes FOR 1 TO pulseCount
pulses. For one pulse forward,
pulseCount can be 1, for ten pulses left, pulseCount
can be set to 10, and so on.
Example Program – AvoidTableEdge.bs2
Open FastIrNavigation.bs2 and save it as AvoidTableEdge.bs2.
Modify the program so that it matches the example program. This will involve
adding variables, modifying the
IF…THEN statements, and nesting the PULSOUT
commands inside a
FOR…NEXT loop. Be careful to make sure that all the
pulseLeft and pulseRight variable values inside the IF…THEN statement are
properly adjusted. Their values are different from the ones in
FastIrNavigation.bs2 because the rules of the course are different.
Reconnect your board and servos.
Test the program on your electrical tape delimited course.
If you decide to try a tabletop, remember to follow the testing and spotting tips
discussed earlier.
' Robotics with the Boe-Bot - AvoidTableEdge.bs2
' IR detects object edge and navigates to avoid drop-off.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
irDetectLeft VAR Bit ' Variable declarations.
irDetectRight VAR Bit
pulseLeft VAR Word
pulseRight VAR Word
loopCount VAR Byte
pulseCount VAR Byte

Table of Contents

Other manuals for Parallax Boe-Bot

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Parallax Boe-Bot and is the answer not in the manual?

Parallax Boe-Bot Specifications

General IconGeneral
BrandParallax
ModelBoe-Bot
CategoryRobotics
LanguageEnglish