27404 Parallax Inc, 27404 Datasheet - Page 76

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
' -----[ I/O Definitions ]----------------------------------------------------
LedSpeaker
' ---> Pasted from PushbuttonMode.bs2 <---
pbSense
' -----[ Variables ]----------------------------------------------------------
temp
counter
' -----[ EEPROM Data ]--------------------------------------------------------
RunStatus
' ---> Pasted from PushbuttonMode.bs2 <---
ModeSelect
' -----[ Initialization ]-----------------------------------------------------
' ---> Pasted from PushbuttonMode.bs2 <---
IF pbSense = 1 THEN GOSUB Mode_Select
GOSUB Reset
GOSUB Start_Delay
' -----[ Main Routine ]-------------------------------------------------------
' ---> Pasted from PushbuttonMode.bs2 (ModeTest routine)<---
ModeTest:
READ ModeSelect, temp
IF temp = 0 THEN
ELSE
DEBUG CR, "No mode selected",
DEBUG CR, CR, "Operating in mode ", CR
SELECT temp
CASE 1
CASE 2
CASE 3
CASE 4
CASE 5
DEBUG "one"
DEBUG "two"
DEBUG "three"
DEBUG "four"
CR, "Hold down pushbutton",
CR, "then press/release",
CR, "Reset button."
PIN
PIN
VAR
VAR
DATA
DATA
5
6
Word
Byte
0
0
' P5 controls LED & speaker
' Pushbutton connected to P6
' Temporary variable
' Loop counting variable.
' Run status EEPROM byte
' Program
' Call Mode_Select subroutine
' Wait for Reset press/release
' 5 Second delay
' Fetch mode from EEPROM
' Mode = 0 -> no mode selected
' mode <> 0 -> display mode
' Mode Message
' Select mode value to display

Related parts for 27404