27403 Parallax Inc, 27403 Datasheet - Page 119

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
' -----[ I/O Definitions ]---------------------------------------------------
qtiPwrLeft
qtiSigLeft
qtiPwrRight
qtiSigRight
DummyPin
' -----[ Variables ]----------------------------------------------------------
qtiStateLeft
qtiStateRight
qtiLeft
qtiRight
qtiThreshold
' -----[ Initialization ]-----------------------------------------------------
GOSUB Calibrate_Qtis
DEBUG CLS,
' -----[ Main Routine ]-------------------------------------------------------
DO
GOSUB Read_Line_Sensors
DEBUG CRSRXY, 0, 3,
IF qtiStateLeft = 0 THEN
ELSE
ENDIF
DEBUG CRSRX, 8
IF qtiStateRight = 0 THEN
ELSE
ENDIF
PAUSE 100
DEBUG "White"
DEBUG "Black"
DEBUG "White"
DEBUG "Black"
BIN1 qtiStateLeft, CRSRX, 8,
BIN1 qtiStateRight, CR
"FRONT QTI Sensors", CR,
"Left
"-----
PIN
PIN
PIN
PIN
PIN
VAR
VAR
VAR
VAR
VAR
10
9
7
8
6
Bit
Bit
Word
Word
Word
Right", CR,
-----", CR
' Left QTI on/off pin
' Left QTI signal pin
' Right QTI on/off pin
' Right QTI signal pin
' Unused I/O pin
' Stores snapshot of QtiSigLeft
' Stores snapshot of QtiSigRight
' Stores left QTI time
' Stores right QTI time
' Stores black/white threshold
' Display column headings
' DO...LOOP repeats indefinitely
' Get reflection values
' Display reflection values
' Indicate what left QTI sees
' Indicate what right QTI sees
' Delay for slower PCs

Related parts for 27403