27404 Parallax Inc, 27404 Datasheet - Page 16

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
' -----[ Main Routine ]-------------------------------------------------------
FOR counter = 1 TO 100
NEXT
DEBUG "Done!", CR,
END
Understanding Forward100Pulses.bs2
When you click the BASIC Stamp Editor's Run button, the program downloads to the
SumoBot's BASIC Stamp. The
message "Press/release Reset...", then it ends the program. When you press and release
the Reset button on the SumoBot board, the same
message "Main program running..." and moves on to the Main Routine and the servos
start turning. If you leave the SumoBot connected to its serial cable and press/release the
Reset button a third time, you will again see the "Press/release Reset button" prompt.
Repeat a fourth time, and the servos will run for a couple seconds.
The reason the
manipulates values stored in the SumoBot's EEPROM program memory. The portion of
this memory that is not used to store the program can be used to store values. While the
BASIC Stamp's RAM memory is erased whenever the power is turned off or the Reset
button is pressed and released, the EEPROM memory retains the values stored in it.
That's why the same program runs after your turn the SumoBot's power off, then back on.
The ability to retrieve values stored in EEPROM, change them, and store them back into
EEPROM is what allows the
released the Reset button an odd or even number of times. The mechanics of exactly how
the
For now, just keep in mind that the
continue to the Main Routine when you have pressed and released the SumoBot's Reset
button an odd number of times. That means, the first, third, fifth,... time you press and
release the Reset button, the program will continue to the Main Routine, and the servos
will turn for about 2 1/2 seconds. Whenever you have pressed/released the Reset button
DEBUG "Main program running...", CR
PULSOUT ServoLeft,
PULSOUT ServoRight, 650
PAUSE 20
Reset_Button
"Press/release reset", CR,
"twice to restart...", CR
Reset_Button
routine does this is covered in more detail in Chapter 2, Activity #2.
850
Reset_Button
Reset_Button
routine is able to perform this function is because it
Reset_Button
routine to track whether you've pressed and
routine in the Initialization displays the
' Display program status
' Deliver 100 forward pulses
' User instructions
Reset_Button
routine allows the program to
routine displays the

Related parts for 27404