27404 Parallax Inc, 27404 Datasheet - Page 71

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
Example Program: PushbuttonMode.bs2
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - PushbuttonMode.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
pbSense
LedSpeaker
' -----[ Variables ]----------------------------------------------------------
temp
counter
Enter, save, and run PushbuttonMode.bs2.
Press and hold the pushbutton as you press and release the Reset Button.
Wait until the speaker beeps three consecutive times before letting go of the
pushbutton.
Verify that the Debug Terminal indicates mode 3 has been selected.
Repeat and try selecting different modes.
Strategy Tip
Your SumoBot programs could use this mode argument any number of ways. For example,
it might use SELECT...CASE to choose between different kinds of navigation routines that
search for opponents. On the other hand, it might just select something like a frequency to
use to make the SumoBot's IR object detectors more nearsighted, or a different number of
pulses for turning in place in the ring.
ENDIF
END
ENDSELECT
CASE 1
CASE 2
CASE 3
CASE 4
CASE 5
PIN
PIN
DEBUG "one"
DEBUG "two"
DEBUG "three"
DEBUG "four"
DEBUG "five"
VAR
VAR
6
5
Word
Byte
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' Pushbutton connected to P6
' LED/speaker connected to P5
' Temporary variable
' Loop counting variable.
' End program

Related parts for 27404