Announcement

Collapse
No announcement yet.

Switch Images

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

  • Switch Images

    Hi,

    Is it possible to have an image control, and during runtime (controlled via Serial using an Arduino), switch which image the control displays? Basically, if I create a button in Photoshop, with two versions, one green/active, and one red/inactive, I want to be able to choose at runtime which of those images the picture control displays. Is that doable?

    What's the usual best practice for user-created images that serve as buttons?

    Thanks!

  • #2
    Hello,

    Yes this is possible and is the widely used method for changing the appearance of a button etc at runtime. You would create your 2 sets of buttons in your paint package and the load these images into two seperate UserButtons. Both these buttons would be placed on top of each other and whenever you want to show the desired button you simply do that via your serial command.

    You can either use UserButtons or Userimages. User buttons will have the built in responses to touch. With Userimages you will create your own handling for a touch on the Userimage.

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      I'm assuming the serial commands are to show one of the buttons and hide the other one?

      I just ordered the gen4 24pt tonight. Is there anything special that I need in order to use that with an arduino? I assume the included IB module has wires for power, ground, tx, and rx? Which arduino library is best to use?

      thanks!

      Comment


      • #4
        Hello

        Yes that is correct and you can enable/disable them also

        The included gen4-IB module is all that you will need to connect to the Arduino. If your aare going to use Visi-genie then this is the library https://github.com/4dsystems/ViSi-Ge...o-Library-BETA
        If you are using Serial SPE then this is the library https://github.com/4dsystems/Picaso-...rduino-Library

        Best regards

        Paul

        Comment


        • #5
          I can't find any example code that has to do with buttons. Is there a command reference document that has all available commands for using the arduino library with a visigenie project?

          Thanks.

          Comment


          • #6
            Hello,

            These appnotes may help you.

            http://www.4dsystems.com.au/appnote/4D-AN-00032/
            http://www.4dsystems.com.au/appnote/4D-AN-00017/
            http://www.4dsystems.com.au/appnote/4D-AN-00030/

            Best regards

            Paul

            Comment

            Working...
            X