Specifications
BASIC Stamp II
Page 344 • BASIC Stamp Programming Manual 1.8 • Parallax, Inc.
Note that to complete the attention-getting code houseA\unit1 we
tacked on the normally optional cycles entry \2 to complete the com-
mand before beginning the next one. Always specify two cycles in
multiple commands unless you’re adjusting the brightness of a lamp
module.
Here is an example of a lamp-dimming instruction:
zPin con 0 ' Zpin is P0.
mPin con 1 ' Mpin is P1.
houseA con 0 ' House code A = 0.
unit1 con 0 ' Unit code 1 = 0.
XOUT mPin,zPin,[houseA\unit1] ' Get unit 1's attention..
XOUT mPin,zPin,[houseA\unitOff\2,houseA\dim\10] ' Dim halfway.
The dim/bright commands support 19 brightness levels. Lamp mod-
ules may also be turned on and off using the standard unitOn and
unitOff commands. In the example instruction above, we dimmed the
lamp by first turning it comletely off, then sending 10 cycles of the dim
command. This may seem odd, but it follows the peculiar logic of the
X-10 system. See the table in BS2 app note #1, X-10 Control, for com-
plete details.
Demo Program
See the program listing accompanying BS2 app note #1, X-10 Control.










