27404 Parallax Inc, 27404 Datasheet - Page 201

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
GOSUB Reset
GOSUB Start_Delay
GOSUB Calibrate_Qtis
GOSUB Look_About
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
' -----[ Subroutine - Reset ]-------------------------------------------------
Reset:
' -----[ Subroutine - Start_Delay ]-------------------------------------------
Start_Delay:
IF qtiLF = 1 THEN
ELSEIF qtiRF = 1 THEN
ELSEIF irLF = 1 AND irRF = 1 THEN
ELSEIF irLF = 1 THEN
ELSEIF irRF = 1 THEN
ELSEIF irLS = 1 THEN
ELSEIF irRS = 1 THEN
ELSE
ENDIF
READ RunStatus, temp
temp = temp + 1
WRITE RunStatus, temp
IF (temp.BIT0 = 1) THEN
ELSE
ENDIF
RETURN
GOSUB Avoid_Tawara_Left
GOSUB Avoid_Tawara_Right
GOSUB Go_Forward
GOSUB Track_Front_Left_Object
GOSUB Track_Front_Right_Object
GOSUB Track_Side_Left_Object
GOSUB Track_Side_Right_Object
GOSUB Search_Pattern
DEBUG CLS, "Press/release Reset", CR,
END
DEBUG CR, "Program running..."
"button..."
' Wait for Reset press/release
' 5 Second delay
' Determine b/w threshold
' Was Goto Look_About
' Left qti sees line?
' State = avoid left tawara
' Right qti sees line?
' State = avoid right tawara
' Both? Lunge forward
' State = Go forward
' Just left?
' State = Track front left obj.
' Just right?
' State = Track front right obj.
' Left side?
' State = track side left obj.
' Right side?
' State = track side right obj.
' Nothing sensed?
' State = Search pattern
' Byte @RunStatus -> temp
' Increment temp
' Store new value for next time
' Examine temp.BIT0
' 1 -> end, 0 -> keep going

Related parts for 27404