27220 Parallax Inc, 27220 Datasheet - Page 33

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
12. Be Generous With White Space
White space (spaces and blank lines) has no effect on compiler or BASIC Stamp
performance, so be generous with it to make listings easier to read. As suggested in
#8 above, allow at least one blank line before program labels (two blanks lines
before a subroutine label is recommended). Separate items in a parameter list with
a space.
An exception to this guideline is with the
SHIFTOUT, the REP modifier for DEBUG and SEROUT, and the byte count and
terminating byte value for SERIN. In these cases, format without additional white
space.
13. Use Conditional Compilation for Compatibility
Some commands such as SERIN and SEROUT use different parameters based on the
target BASIC Stamp. Use conditional compilation for maximum compatibility of your
programs.
Main:
Update_Motors:
#SELECT $STAMP
DO
LOOP
PULSOUT leftMotor, leftSpeed
PULSOUT rightMotor, rightSpeed
PAUSE 20
task = (task + 1) // NumTasks
RETURN
SHIFTIN A2Ddata, A2Dclock, MSBPOST, [result\9]
DEBUG REP "*"\25, CR
SERIN IRbSIO, IRbBaud, [buffer\8\255]
#CASE BS2, BS2E, BS2PE
#CASE BS2SX, BS2P
ON task GOSUB Update_Motors, Scan_IR, Close_Gripper
T1200
T2400
T9600
T1200
T2400
CON
CON
CON
CON
CON
813
396
84
2063
1021
Bits
parameter used with SHIFTIN and

Related parts for 27220