27404 Parallax Inc, 27404 Datasheet - Page 131

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 - Read_Object_Detectors ]---------------------------------
Read_Object_Detectors:
' -----[ Subroutine - Read_Pushbutton ]---------------------------------------
Read_Pushbutton:
HIGH qtiPwrLeft
HIGH qtiPwrRight
HIGH qtiSigLeft
HIGH qtiSigRight
PAUSE 1
INPUT qtiSigLeft
INPUT qtiSigRight
PULSOUT DummyPin, qtiThreshold
qtiStateLeft
qtiStateRight = ~ qtiSigRight
LOW qtiPwrLeft
LOW qtiPwrRight
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
input pbSense
pushbutton = pbSense
RETURN
= ~ qtiSigLeft
' Turn on QTIs
' Push signal voltages to 5 V
' Wait 1 ms for capacitors
' Start the decays
' Wait for threshold time
' Snapshot of QTI signal states
' Turn off QTIS
' Right side IR LED headlight
' Save right side IR receiver
' Repeat for right-front
' Repeat for left-front
' Repeat for left side
' Store state of pbSense

Related parts for 27404