Announcement

Collapse
No announcement yet.

Using the winbutton itself to show an on or off state

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using the winbutton itself to show an on or off state

    Hey people;

    I was wondering if the AruinoVisiGenie library gives you the ability to control the status when on or status when off on a winbutton controlled by a command from the Arduino ?

    That way I could write from the arduino to the LCD to set the button to that preset color.

    It could show if something was switched on/off with that same button indicated from the button itself rather then from an indicater/led next to the button.

    If so, what is the command for that? I cant seem to find any in the library...

    Tnx for your time!

  • #2


    You can't 'change' a button at run time, but you can certainly change it's 'status',

    eg for a toggle button, this will change it's on and off status.

    Set Winbutton Value 07:52:24.515 [01 06 00 00 01 06]

    ACK 07:52:24.543 [06]

    Set Winbutton Value 07:52:26.209 [01 06 00 00 00 07]

    ACK 07:52:26.226 [06]


    Mark

    Comment


    • #3


      If you are using the ViSi-Genie-Arduino library, this app note might help you:

      4D-AN-P4018_ViSi-Genie_Writing_to_Genie_Objects_Using_an_Arduino_Host

      Go to page 9.

      App notes are located here: http://www.4dsystems.com.au/appnotes/



      Hope this helps.
      Doff

      Comment


      • #4


        That solution works, but I think its not reliable;

        For example: If the host(Arduino) misses a on command from the LCD, then the button is in active state, but the arduino missed that and remains in off state.
        It would be more reliable to have the arduino controlling the state of the button, depending on its received on command. that way it can never go wrong.

        I will use a custom led next to the winbutton for now, showing the toggled (On/Off) state.

        Maybe its a good idea to have an more visible On/off state for example making the complete button a different color, and making it possible to be able to control it in run mode.
        That way the button itself makes it visible to the user what mode it is in (switched on/switched of).

        Ill have a look at the rocker switch now, maybe thats a good solution...

        Anyway, I keep at it, this software really rocks!
        Greetz

        Comment

        Working...
        X