28125 Parallax Inc, 28125 Datasheet - Page 232

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
This is the subroutine that performs the
circuits. The measurement for the left circuit is stored in the
measurement for the right circuit is stored in the
The Navigate subroutine uses an
against the
RightThreshold
means bright light is detected, and when it’s large, it means the light is not as bright. So,
when one of the variables that stores an
threshold constant, it means the flashlight beam has been detected; otherwise, the
flashlight beam has not been detected. Depending on which condition this subroutine
detects (both, left, right or neither), the correct navigation pulses is applied, followed by a
PAUSE
before the
Test_Photoresistors:
Navigate:
HIGH 6
PAUSE 3
RCTIME 6,1,timeLeft
HIGH 3
PAUSE 3
RCTIME 3,1,timeRight
RETURN
IF(timeLeft<LeftThreshold)AND(timeRight<RightThreshold) THEN
ELSEIF (timeLeft < LeftThreshold) THEN
ELSEIF (timeRight < RightThreshold) THEN
ELSE
ENDIF
PULSOUT 13, 850
PULSOUT 12, 650
PULSOUT 13, 700
PULSOUT 12, 700
PULSOUT 13, 800
PULSOUT 12, 800
PULSOUT 13, 750
PULSOUT 12, 750
LeftThreshold
RETURN
constant. Remember, when the
command exits the subroutine.
constant and the
IF…THEN
RCTIME
statement to compare the
RCTIME
timeRight
measurements on both photoresistor RC
timeRight
RCTIME
measurement is smaller than the
variable.
timeLeft
measurement is small, it
variable against the
timeLeft
variable, and the
variable

Related parts for 28125