27404 Parallax Inc, 27404 Datasheet - Page 114

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
Figure 3-15 Pulse-Decay Trick Timing
Accounting for Command Execution Times
Figure 3-15 shows the ideal situation, ignoring the amount of time it takes for the BASIC
Stamp 2 to transition from one command to the next. Subtracting 220 from the threshold
variable will make your PULSOUT 6, threshold command delay for the correct amount of
time. Of course, if you subtract 220 from a value that's smaller than 220, your program will
have a negative result, which won't be any good either. That's why it's best to have an
IF...THEN statement check the value of time before subtracting 220
You can measure these times with the Parallax USB Oscilloscope. To learn more about the
‘scope and the Understanding Signals student guide, see the #28119 product page at
www.parallax.com.
HIGH 10
HIGH 9
PAUSE 1
RCTIME 9, 1, time
threshold = time / 4
IF threshold > 220 THEN
ELSE
ENDIF
threshold = threshold - 220
threshold = 0
' Account for code overhead

Related parts for 27404