27404 Parallax Inc, 27404 Datasheet - Page 118

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
The last step is to go through the Main Routine and change references to variables from
qtiLeft
be compared to 0 or 1 instead of
has to be changed to
Example Program: QtiPulseDecayTrick.bs2
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - QtiPulseDecayTrick.bs2
' This program uses the Pulse-Decay trick to discern between black and white
' with QTI line sensors.
' Important: You must start with the QTIs seeing black.
' {$STAMP BS2}
' {$PBASIC 2.5}
Read_Line_Sensors:
IF qtiLeft < qtiThreshold THEN
IF qtiStateLeft = 0 THEN
Start with your SumoBot parked on the black part of your practice sumo ring.
Enter, save, and run QtiPulseDecayTrick.bs2.
Verify that the Debug Terminal shows that the QTIs report 1 if they are over the
black practice ring surface or 0 if they are over the white tawara line.
and
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
qtiRight
to
= qtiSigLeft
qtiStateLeft
threshold
and
. For example:
qtiStateRight
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' 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
. The values also have to

Related parts for 27404