28125 Parallax Inc, 28125 Datasheet - Page 266

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
Back_Up:
Your Turn
ACTIVITY #5: HIGH PERFORMANCE IR NAVIGATION
The style of pre-programmed maneuvers that were used in the previous activity were fine
for whiskers, but are unnecessarily slow when using the IR LEDs and detectors. You can
greatly improve the Boe-Bot’s roaming performance by checking for obstacles before
delivering each set of pulses to the servos. The program can use the sensor inputs to
select the best maneuver for each moment of navigation. That way, the Boe-Bot never
turns further than it has to, and it can neatly find its way around obstacles and
successfully navigate more complex courses.
Sampling Between Every Pulse to Avoid Collisions
The great thing about detecting an obstacle before bumping into it is that it gives the Boe-
Bot some room to navigate around it. The Boe-Bot can apply a pulse to turn away from
an object, check again and if the object is still there, apply another pulse to avoid it. The
Boe-Bot can keep applying pulses and checking, until it steers clear of the obstacle.
Then, it can resume forward pulses.
program, you’ll likely agree that it’s a much better way for the Boe-Bot to roam.
Example Program – FastIrRoaming.bs2
' Robotics with the Boe-Bot - FastIrRoaming.bs2
' Higher performance IR object detection assisted navigation
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
irDetectLeft
FOR pulseCount = 0 TO 40
NEXT
RETURN
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
Modify RoamingWithIr.bs2 so that the IR pairs are checked in a subroutine.
Enter, save, and run FastIrRoaming.bs2.
VAR
Bit
After experimenting with this next example
' Back up.
' Variable Declarations

Related parts for 28125