27403 Parallax Inc, 27403 Datasheet - Page 142

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 - Read_Line_Sensors ]-------------------------------------
Read_Line_Sensors:
'
' -----[ Subroutine - Read_Object_Detectors ]---------------------------------
Read_Object_Detectors:
' -----[ Subroutine - Read_Pushbutton ]---------------------------------------
Read_Pushbutton:
WRITE QtiThresh, Word multi
RETURN
HIGH qtiPwrLeft
HIGH qtiPwrRight
HIGH qtiSigLeft
HIGH qtiSigRight
PAUSE 1
READ QtiThresh, Word temp
INPUT qtiSigLeft
INPUT qtiSigRight
PULSOUT DummyPin, temp
qtiLF
qtiRF = ~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
PULSOUT DummyPin, qtiThreshold
= ~qtiSigLeft
' Turn on QTIs
' Push signal voltages to 5 V
' Wait 1 ms for capacitors
' <-- Add get threshold time
' Start the decays
' Wait for threshold time
' <--- New wait 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
' <--- New threshold to EEPROM

Related parts for 27403