Specifications
BASIC Stamp II Application Notes
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 349
2
' ON to dimmed OFF in 19 steps. Because dimming is relative to
' the current state of the lamp, the only guaranteed way to set a
' predefined brightness level is to turn the dimmer fully OFF, then
' ON, then dim to the desired level. Otherwise, the final setting of
' the module will depend on its initial brightness level.
xout mPin,zPin,[houseA\Unit2] ' Talk to Unit 2.
' This example shows how to combine X-10 instructions into a
' single line. We send OFF to the previously identified unit (Unit2)
' for 2 cycles (the default for non-dimmer commands). Then a comma
' introduces a second instruction that dims for 10 cycles. When you
' combine instructions, don't leave out the number of cycles. The
' Stamp may accept your instruction without complaint, but it
' won't work correctly--it may see the house code as the number of
' cycles, the instruction as the house code, etc.
xout mPin,zPin,[houseA\unitoff\2,houseA\dim\10]
' Just to reinforce the idea of combining commands, here's the
' first example again:
xout mPin,zPin,[houseA\Unit1\2,houseA\uniton] ' Turn Unit 1 ON.
pause 1000 ' Wait a second.
xout mPin,zPin,[houseA\Unit1\2,houseA\unitoff] ' Turn Unit 1 OFF.
' End of program.
stop










