27404 Parallax Inc, 27404 Datasheet - Page 186

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
' -----[ Subroutine - Servos_And_Sensors ]------------------------------------
Servos_And_Sensors:
'
' -----[ Subroutine - Pulse_Servos ]------------------------------------------
Pulse_Servos:
LOW qtiPwrLeft
multi = temp
HIGH qtiPwrRight
HIGH qtiSigRight
PAUSE 1
RCTIME qtiSigRight, 1, temp
multi = (multi + temp) / 2
multi = multi / 4
IF multi > 220 THEN
ELSE
ENDIF
WRITE QtiThresh, Word multi
RETURN
GOSUB Pulse_Servos
' Call sensor subroutine(s).
sensors = 0
GOSUB Read_Line_Sensors
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
GOSUB Read_Object_Detectors
multi = multi - 220
multi = 0
NO_ROT, FS_CCW, LS_CCW, FS_CCW ], temp
FS_CW, NO_ROT, FS_CW, LS_CW ], temp
' Turn left QTI off
' Free temp for another RCTIME
' Turn right QTI on
' Discharge capacitor
' Measure charge time
' Calculate average
' Take 1/4 average
' Account for code overhead
' Threshold to EEPROM
' Call Pulse_Servos subroutine
' Clear previous sensor values
' Look for lines
' Call Read_Object_Detectors

Related parts for 27404