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

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
Read_Left:
Read_Right:
HOW IT WORKS
This program starts by activating the left QTI line sensor, then bringing its R line high to
discharge the onboard capacitor (both sides of the capacitor will be at 5v, hence it is
discharged). A one millisecond PAUSE gives the capacitor plenty of time to discharge
through the 220 Ω resistor.
After the capacitor is fully discharged, RCTIME makes the R line an input and allows the
capacitor to begin to charge (the plate connected to the R line will move toward Vss).
While the capacitor is charging, the RCTIME instruction increments an internal counter.
When the BASIC Stamp sees approximately 1.4 volts on the R line, the counter value is
placed in the output variable called lLine . At this point the process is complete and the
QTI is deactivated.
The process is repeated for the right-side QTI and DEBUG is used to display the values.
Figure 3.2 shows the output of the program with the left QTI over the Tawara (white
border) line and the right QTI over the black playing field.
difference between the two values.
Run the program (using Position 1 of the power switch) and record the values from your
SumoBot QTI sensors in the space below:
HIGH LLinePwr
HIGH LLineIn
PAUSE 1
RCTIME LLineIn, 1, lLine
LOW LLinePwr
RETURN
HIGH RLinePwr
HIGH RLineIn
PAUSE 1
RCTIME RLineIn, 1, rLine
LOW RLinePwr
RETURN
Left QTI
Right QTI
Chapter 3: SumoBot Sensors and Border Detection · Page 25
Black
' activate sensor
' discharge QTI cap
' read sensor value
' deactivate sensor
' activate sensor
' discharge QTI cap
' read sensor value
' deactivate sensor
White
Notice the dramatic

Related parts for 122-27400