27404 Parallax Inc, 27404 Datasheet - Page 192

COMPETITION RING FOR SUMOBOT

27404

Manufacturer Part Number
27404
Description
COMPETITION RING FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 27404

Accessory Type
Hobby and Education
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
SumoBot®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
FS_CW
NO_ROT
LS_CCW
LS_CW
' IR object detectors
IrFreq
' -----[ Variables ]----------------------------------------------------------
temp
multi
counter
maneuver
sensors
qtiLF
qtiRF
irLS
irLF
irRF
irRS
' -----[ EEPROM Data ]--------------------------------------------------------
RunStatus
QtiThresh
' -----[ Initialization ]-----------------------------------------------------
GOSUB Reset
GOSUB Start_Delay
GOSUB Calibrate_Qtis
GOTO Look_About
' -----[ Main Routine ]-------------------------------------------------------
DO
IF qtiLF = 1 THEN
FOR counter = 1 TO 15
NEXT
FOR counter = 1 TO 15
maneuver = Backward
GOSUB Servos_And_Sensors
maneuver = RotateRight
GOSUB Servos_And_Sensors
CON
CON
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
DATA
DATA
650
750
770
730
38500
Word
Word
Byte
Nib
Byte
sensors.BIT5
sensors.BIT4
sensors.BIT3
sensors.BIT2
sensors.BIT1
sensors.BIT0
0
Word 0
' Full speed clockwise
' No rotation
' Low speed counterclockwise
' Low speed clockwise
' IR LED frequency
' Temporary variable
' Multipurpose variable
' Loop counting variable.
' SumoBot travel maneuver
' Sensor flags byte
' Stores snapshot of QtiSigLeft
' Stores snapshot of QtiSigRight
' State of Left Side IR
' State of Left Front IR
' State of Right Front IR
' State of Right Side IR
' Run status EEPROM byte
' Word for QTI threshold time
' Wait for Reset press/release
' 5 Second delay
' Determine b/w threshold
' Start mid search pattern
' Left QTI sees line?
' State = Avoid tawara left
' Back up
' Turn right

Related parts for 27404