122-27400 Parallax Inc, 122-27400 Datasheet - Page 34

MANUAL FOR SUMOBOT

122-27400

Manufacturer Part Number
122-27400
Description
MANUAL FOR SUMOBOT
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-27400

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
Page 24 · SumoBot – Mini Sumo Robotics
After the QTI is activated, the capacitor is discharged by bringing the R line high and
holding it for about one millisecond. RCTIME is then used to measure the time required
to charge the capacitor to a specified level. This timing will be controlled by the current
flow through the phototransistor side of the QRD1114.
field, the phototransistor current flow will be very low so the capacitor will take a long
time to charge, hence RCTIME will return a large value. When the QTI is positioned over
the white border line, the current flow through the phototransistor is high, so the capacitor
charge time is fast and RCTIME returns a small value.
Load and run program 3.1 to test and evaluate the QTI sensors.
' SumoBot_3.1_Line_Sensor_Test.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]-------------------------------------------------
LLinePwr
LLineIn
RLinePwr
RLineIn
' -----[ Variables ]-------------------------------------------------------
lLine
rLine
' -----[ Program Code ]----------------------------------------------------
Main:
' -----[ Subroutines ]-----------------------------------------------------
DO
LOOP
END
GOSUB Read_Left
GOSUB Read_Right
DEBUG HOME,
PAUSE 100
"Left ", TAB, "Right", CR,
"-----", TAB, "-----", CR,
DEC lLine, CLREOL, TAB, DEC rLine, CLREOL
PIN
PIN
PIN
PIN
VAR
VAR
10
Word
Word
9
7
8
' left line sensor power
' left line sensor input
' right line sensor power
' right line sensor input
' left sensor raw reading
' right sensor raw reading
When over the black playing

Related parts for 122-27400