simple way?


Closed Thread
Results 1 to 2 of 2

Thread: simple way?

  1. #1

    Default simple way?

    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

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Your answer is hidden in the Pbpicxx.libs ...XOUT section ...

    Alain

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  3. Simple LCD code not working!...WHY?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th November 2009, 19:48
  4. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  5. Replies: 4
    Last Post: - 7th September 2005, 14:11

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts