28125 Parallax Inc, 28125 Datasheet - Page 297

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
Get_Ir_Distances:
' -----[ Subroutine – Get Pulse ]---------------------------------------------
Send_Pulse:
How the FollowingBoeBot.bs2 Works
FollowingBoeBot.bs2 declares four constants,
using the
constant). Likewise, everywhere you see either
actually 35, and
The first thing the main routine does is call the
Get_Ir_Distances
contain a number corresponding to the zone in which an object was detected for both the
left and right IR pairs.
distanceLeft = 0
distanceRight = 0
FOR freqSelect = 0 TO 4
NEXT
RETURN
PULSOUT 13,pulseLeft
PULSOUT 12,pulseRight
PAUSE 5
RETURN
LOOKUP freqSelect,[37500,38250,39500,40500,41500], irFrequency
FREQOUT 8,1,irFrequency
irDetectLeft = IN9
distanceLeft = distanceLeft + irDetectLeft
FREQOUT 2,1,irFrequency
irDetectRight = IN0
distanceRight = distanceRight + irDetectRight
Kpl
Kpr
SetPoint
CenterPulse
DO
CON
GOSUB Get_Ir_Distances
directive. Everywhere you see
CenterPulse
subroutine is finished,
CON
CON
CON
CON
is 750.
-35
35
2
750
distanceLeft
Get_Ir_Distances
Kpr
SetPoint
Kpl
,
, it’s actually the number -35.
Kpl, SetPoint
, it’s actually the number 2 (a
and
distanceRight
subroutine. After the
, and
CenterPulse
Kpr
each
is

Related parts for 28125