27404 Parallax Inc, 27404 Datasheet - Page 132

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
Your Turn - Cleaning up Names
These variable declaration names have some room for improvement:
The main problem is that they are not really consistent. The object detector variables are
pretty good, there's
qtiState
If you change it here, you should make sure that every instance in the program is also
changed. This is where the BASIC Stamp Editor's Edit -> Find/Replace feature comes in
handy.
irLS
irLF
irRF
irRS
qtiStateLeft
qtiStateRight
Save TestAllSensors as TestAllSensorsYourTurn.bs2.
In the BASIC Stamp Editor, click Edit and select Find/Replace.
Enter
shown in Figure 3-20.
Click Replace all. A message displaying the number of replacements should tell
you how many changes were made as shown in Figure 3-21.
variables don't match the object variable's name conventions, but they should.
qtiStateLeft
irLF
VAR
VAR
VAR
VAR
VAR
VAR
for IR-detector-left-front (LF), right-front(RF), and so on. The
into the Find field and
Bit
Bit
Bit
Bit
Bit
Bit
' State of Left Side IR
' State of Left Front IR
' State of Right Front IR
' State of Right Side IR
' Stores snapshot of QtiSigLeft
' Stores snapshot of QtiSigRight
Figure 3-21
Information Window
qtiLF
Figure 3-20
Find/Replace
Window
into the replace field as

Related parts for 27404