27404 Parallax Inc, 27404 Datasheet - Page 217

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
itself that you have declared two symbols,
and
The
condition is
PIN
LedSpeaker PIN 5
the
Here is a variable declaration and
conditional compiler directives, so they will be part of the program regardless of the
value of
Since
will be part of the program. Again the commands in the other
well be comments. However, if you change
DEBUG_MODE = 0
block will be compiled. The program would instead display the message
is zero
LedSpeaker PIN
DEBUG_MODE
directive will be compiled. In other words, the BASIC Stamp Editor will consider
#IF...#ENDIF
DEBUG_MODE
' -----[ 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
DEBUG_MODE
."
Most compiler directives begin with #. Examples include #DEFINE, #IF, #THEN, #ELSE,
#SELECT, and #CASE.
$PBASIC.
LedSpeaker PIN 5
LED_MODE = 1
, which has been set equal to two.
and re-run the program, only the
was declared as 2, only the command
code block below is called a conditional compiler directive. The
to be part of the program. If
or
directive would be ignored, just as comments are ignored.
LED_MODE
. If that's how
The others begin with the dollar sign, such as $STAMP and
.
DEBUG
LED_MODE
LED_MODE
command that are not nested inside any
#DEFINE DEBUG_MODE = 2
LED_MODE
was declared, then the
, which has been set equal to one,
DEBUG
DEBUG
command in the
is any value other than 1,
#CASE
"
DEBUG_MODE = 2
directives might as
"DEBUG_MODE
LedSpeaker
to
#CASE 0
#DEFINE
."

Related parts for 27404