27403 Parallax Inc, 27403 Datasheet - Page 61

GUIDE APP ROBOTCS W/SUMOBOT V1.0

27403

Manufacturer Part Number
27403
Description
GUIDE APP ROBOTCS W/SUMOBOT V1.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 27403

Accessory Type
Manual
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
continues to the rest of the program. As you keep pressing the Reset button, the odd/even
pattern continues, as does the program's alternation between the "Press/release Reset..."
and "Program running..." messages.
Example Program: TestResetButton.bs2
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - TestResetButton.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]---------------------------------------------------
LedSpeaker
' -----[ Variables ]----------------------------------------------------------
temp
counter
' -----[ EEPROM Data ]--------------------------------------------------------
RunStatus
' -----[ Initialization ]-----------------------------------------------------
GOSUB Reset
GOSUB Start_Delay
' -----[ Main Routine ]-------------------------------------------------------
ResetTest:
DEBUG CR, "Done!"
Enter, save, and download TestResetButton.bs2.
Verify that it displays the "Press/release reset button..." message and ends the
program.
Press/release the Reset button. Verify that the program displays the message
"Program running...", beeps 5 times, then displays the message "Done!".
Press/release the Reset button a second time.
Verify that the program behaves the same as it did when you first downloaded it.
Press/release the Reset button a third time, and verify that it behaves the same
way it did the first time you did it.
Keep repeating a few more times to make sure the odd/even pattern continues.
PIN
VAR
VAR
DATA
5
Word
Byte
0
' Target = BASIC Stamp 2
' Language = PBASIC 2.5
' P5 controls LED & speaker
' Temporary variable
' Loop counting variable.
' Run status EEPROM byte
' Wait for Reset press/release
' 5 Second delay
' Verify we made it to main.

Related parts for 27403