27404 Parallax Inc, 27404 Datasheet - Page 183

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
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - SearchPatternAndAvoidTawara.bs2
' SumoBot searches the sumo ring for opponent and changes direction whenever
' it encounters the white Tawara line.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
ServoLeft
ServoRight
qtiPwrLeft
qtiSigLeft
qtiPwrRight
qtiSigRight
Press and hold the Reset button until you place it on the ring as shown in Figure
4-12.
Let go of the Reset button, and compare your search pattern to the one shown in
the figure.
Tune your
to resemble the one in the figure, or if you have a search pattern in mind that you
think will be effective, modify the State = search routine as you see fit.
Does your SumoBot mistake creases in the poster for white tawara lines? If your
SumoBot backs up and then executes a turn before it gets to the white tawara line, it may be
detecting one or more of the creases in the SumoBot Competition Ring poster. This is most
likely to happen when the SumoBot Competition Ring poster is in or near direct sunlight.
If the lighting conditions are still too bright, you can make the QTI self calibration code set a
lower threshold by changing this command:
The higher the value divided into multi, the lower the threshold, and the less sensitive the
SumoBot will be to creases in the poster. This is a bit of a double-edged sword, because it
also makes the SumoBot less sensitive to the white tawara line, and we don't want it to miss
that.
PIN
PIN
PIN
PIN
PIN
PIN
If your SumoBot is having problems detecting the creases on the poster, go back
to page 9 and make sure you have followed the setup instructions.
Instead of dividing multi by 4, try 5, 6, 7, 8, 9, and 10.
FOR...NEXT
multi = multi / 4
13
12
10
9
7
8
loops so that your SumoBot's search pattern either starts
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' Left servo connected to P13
' Right servo connected to P12
' Left QTI on/off pin P10
' Left QTI signal pin P9
' Right QTI on/off pin P7
' Right QTI signal pin P8
' Take 1/4 average

Related parts for 27404