122-27400 Parallax Inc, 122-27400 Datasheet - Page 59

MANUAL FOR SUMOBOT

122-27400

Manufacturer Part Number
122-27400
Description
MANUAL FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-27400

Accessory Type
Manual
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
Scan_Left:
Follow_Right:
Follow_Left:
Lunge:
' If SumoBot can see the opponent with both "eyes" and both QTIs are
' detecting the border, we must have pushed the opponent out.
Match_Over:
GOTO Main
FOR pulses = 1 TO 5
NEXT
GOSUB Creep_Forward
GOTO Main
PULSOUT LMotor, LFwdFast
PULSOUT RMotor, RRevSlow
lastIR = irBits
GOTO Main
PULSOUT LMotor, LRevSlow
PULSOUT RMotor, RFwdFast
lastIR = irBits
GOTO Main
FOR pulses = 1 TO 25
NEXT
GOTO Main
FOR pulses = 1 TO 10
NEXT
INPUT LMotor
INPUT RMotor
FOR temp = 1 TO 10
NEXT
PULSOUT LMotor, LRevSlow
PULSOUT RMotor, RFwdSlow
PAUSE 20
PULSOUT LMotor, LFwdFast
PULSOUT RMotor, RFwdFast
GOSUB Read_Line_Sensors
IF (lineBits = %11) THEN Match_Over
PULSOUT LMotor, LStop
PULSOUT RMotor, RStop
PAUSE 20
HIGH StartLED
FREQOUT Speaker, 100, 2500, 3000
INPUT StartLED
PAUSE 100
Chapter 5: Basic Competition Code · Page 49
' spin left, slow
' spin right, fast
' save last direction found
' spin left, fast
' locked on -- go get him!
' in sight, we're on the line
' stop motors
' make some noise
' beep
' blink LED

Related parts for 122-27400