27404 Parallax Inc, 27404 Datasheet - Page 219

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
' -----[ Title ]--------------------------------------------------------------
' Applied Robotics with the SumoBot - CompilerDirectives.bs2
' How to use compiler directives to select which code blocks to run.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Compiler Definitions ]-----------------------------------------------
#DEFINE LED_MODE = 1
#DEFINE DEBUG_MODE = 2
' -----[ I/O Definitions ]----------------------------------------------------
#IF LED_MODE = 1 #THEN
#ENDIF
' -----[ Variables ]----------------------------------------------------------
counter VAR Word
' -----[ Initialization ]-----------------------------------------------------
DEBUG CLS, "Program running...", CR, CR
#SELECT DEBUG_MODE
#ENDSELECT
DEBUG CR, CR
' -----[ Main Routine ]-------------------------------------------------------
LedSpeaker PIN 5
#CASE 0
#CASE 1
#CASE 2
DEBUG "DEBUG_MODE is zero."
DEBUG "DEBUG_MODE is one."
DEBUG "DEBUG_MODE is two."
Enter, save, and run Compiler directives.bs2 and check the program's behavior
against your predictions.
Change
Predict how the program will behave the next time it is downloaded to the
BASIC Stamp.
Run the program, and again test your predictions.
Repeat for the other four combinations of values that you can set
DEBUG_MODE
#DEFINE LED_MODE = 1
equal to.
to
#DEFINE LED_MODE = 0
.
LED_MODE
and

Related parts for 27404