27297 Parallax Inc, 27297 Datasheet - Page 33

KIT STAMPWORKS WITH BS2-IC

27297

Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet

Specifications of 27297

Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
27297SQ
Manufacturer:
NS
Quantity:
4
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 27297