27403 Parallax Inc, 27403 Datasheet - Page 166

GUIDE APP ROBOTCS W/SUMOBOT V1.0

27403

Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 27403

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
' -----[ Subroutine - Pulse_Servos ]------------------------------------------
Pulse_Servos:
' -----[ Subroutine - Read_Object_Detectors ]---------------------------------
Read_Object_Detectors:
Your Turn - Orchestrating a Multi-Step Maneuver
Here is a two-step maneuver. The first
If it doesn't see the opponent with both eyes after 15 pulses, it moves on to the second
step. In the second step, the SumoBot rotates in place (
either both IR detectors can see the opponent or until 30 pulses have completed. Again,
that way, the SumoBot won't indefinitely rotate in place.
RETURN
' Pulse to left servo
LOOKUP maneuver, [ FS_CCW, FS_CW, FS_CW, FS_CCW,
PULSOUT ServoLeft, temp
' Pulse to right servo
LOOKUP maneuver, [ FS_CW, FS_CCW, FS_CW, FS_CCW,
PULSOUT ServoRight, temp
' Pause between pulses (remove when using IR object detectors + QTIs).
PAUSE 20
RETURN
FREQOUT IrLedRS, 1, IrFreq
irRS = ~IrSenseRS
FREQOUT IrLedRF, 1, IrFreq
irRF = ~IrSenseRF
FREQOUT IrLedLF, 1, IrFreq
irLF = ~IrSenseLF
FREQOUT IrLedLS, 1, IrFreq
irLS = ~IrSenseLS
RETURN
NO_ROT, FS_CCW, LS_CCW, FS_CCW ], temp
FS_CW, NO_ROT, FS_CW, LS_CW ], temp
DO UNTIL...LOOP
' Right side IR LED headlight
' Save right side IR receiver
' Repeat for right-front
' Repeat for left-front
' Repeat for left side
maneuver = RotateLeft)
curves toward the opponent.
until

Related parts for 27403