28125 Parallax Inc, 28125 Datasheet - Page 230

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
FREQOUT 4, 2000, 3000
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
' -----[ Subroutine - Test_Photoresistors ]-----------------------------------
Test_Photoresistors:
' -----[ Subroutine - Navigate ]----------------------------------------------
Navigate:
GOSUB Test_Photoresistors
GOSUB 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
PAUSE 20
RETURN
PULSOUT 13, 850
PULSOUT 12, 650
PULSOUT 13, 700
PULSOUT 12, 700
PULSOUT 13, 800
PULSOUT 12, 800
PULSOUT 13, 750
PULSOUT 12, 750
' Left RC time measurement.
' Right RC time measurement.
' Both detect flashlight beam,
' full speed forward.
' Left detects flashlight beam,
' pivot left.
' Right detects flashlight beam,
' pivot right.
' No flashlight beam, sit still.
' Pause between pulses.

Related parts for 28125