27403 Parallax Inc, 27403 Datasheet - Page 62

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
' -----[ Subroutine - Reset ]-------------------------------------------------
Reset:
' -----[ Subroutine - Start_Delay ]-------------------------------------------
Start_Delay:
Your Turn
ACTIVITY #4: PUSHBUTTON, LED, AND SPEAKER
The LED and speaker can be used as status indicators. Primarily, the beeping and LED
blinking helps you know when the SumoBot is doing its 5 second countdown. These
indicators are also useful for trouble-shooting SumoBot behavior problems. The single
pushbutton can be used along with the indicators to adjust the SumoBot's behavior
between sumo rounds and even select between different operation modes.
END
READ RunStatus, temp
temp = temp + 1
WRITE RunStatus, temp
IF (temp.BIT0 = 1) THEN
ELSE
ENDIF
RETURN
FOR counter = 1 TO 5
NEXT
RETURN
DEBUG CLS, "Press/release Reset", CR,
END
DEBUG CR, "Program running..."
PAUSE 900
FREQOUT LedSpeaker, 100, 3000
Try modifying the program so that it displays the number of times you have
pressed and released the Reset button.
"button..."
' Byte @RunStatus -> temp
' Increment temp
' Store new value for next time
' Examine temp.BIT0
' 1 -> end, 0 -> keep going
' 5 beeps, 1/second

Related parts for 27403