Hello Everyone. Here is a piece of code. It simply turns an X10 module (with the address 0,0) on, it waits 1 second and turns it off. This works perfectly. What I want to do is use only the first line and replace unitOn with a command that will turn on if it's off and turn off if it's on. Like the "toggle" command. I guess I could use the read and write commands to "remember" the state of the module but was hoping for an easier way. Thanks for any suggestions.
XOUT PORTA.4, PORTA.5, [0\0,0\unitOn]
Pause 1000
XOUT PORTA.4, PORTA.5, [0\0,0\unitOff]
Pause 1000
Bookmarks