28125 Parallax Inc, 28125 Datasheet - Page 312
28125
Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet
1.28125.pdf
(360 pages)
Specifications of 28125
Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 312 of 360
- Download datasheet (5Mb)
' Calculate proportional output and move accordingly.
LOOP
' -----[ Subroutines ]-------------------------------------------------
Navigate_Intersection:
'
' Now back up until one detector sees the black.L & R turn will see
' black on one detector.3- or 4-way will see both black, turn toward
' whichever the bot sees first (random).
' Make 90 degree turn in direction of the detector which sees black
GOSUB Update_LEDs
pulseLeft =
pulseRight = SetPoint - distanceRight * Kpr + CenterPulse
GOSUB Send_Pulse
GOSUB Check_For_Intersection
IF (isStuck = 1) THEN
ENDIF
DO
LOOP UNTIL (distanceLeft <=2) AND (distanceRight <=2)
GOSUB Stop_Quickly
DO
LOOP UNTIL (distanceLeft >=4) OR (distanceRight >=4)
GOSUB Stop_Quickly
IF (distanceLeft >=4) THEN
FOR counter = 1 TO Turn90Degree
NEXT
ELSEIF (distanceRight >=4) THEN
Go forward until both sensors read white, through the intersection.
FOR counter = 1 TO Turn90Degree
GOSUB Make_Noise
GOSUB Navigate_Intersection
pulseLeft = 850:
GOSUB Send_Pulse
GOSUB Get_Ir_Distances
GOSUB Update_LEDs
pulseLeft = 650:
GOSUB Send_Pulse
GOSUB Get_Ir_Distances
GOSUB Update_LEDs
PULSOUT 13, 750
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 850
PULSOUT 12, 750
SetPoint - distanceLeft
pulseRight = 650
pulseRight = 850
' Indicate white/black line
' Are we stuck at intersection?
' Audible indication
' Navigate through it
' Left detector reads black
' Turn 90 degrees left
' without proportional control
* Kpl + CenterPulse
' Forward
' Don't coast forward
' Backward
' Don't coast backward
' so use PAUSE 20
' Right detector reads black
' Turn 90 degrees right
Related parts for 28125
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: