Announcement

Collapse
No announcement yet.

Toggle Object Visibility with Arduino

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

  • Toggle Object Visibility with Arduino

    Hello,

    I am using the uLCD-24PTU display with VisiGenie. Currently I am trying to change the visibility of LEDs, buttons, and text. I am using an Arduino based micro to communicate with my display. I have read in other posts that this can be done by bringing certain items to the front or sending them behind other objects. Is there any tutorials on this or any information on what commands are used? This would be extremely valuable to my project.

    Thanks!

  • #2
    Hi NoleBrain22,

    Normally objects on a form shouldn't overlap. But if you are trying to show and hide objects, then yes you can overlap them. So for instance you have a form with a black background color and a slider. During runtime, you want to show and hide the slider. You could do the ff:

    1. Add a slider object to the form.
    2. Create a user button object with a single black frame (to match the background color). The size of the user button should be enough to cover the slider.
    3. Place the user button object and the slider object on the form such that they overlap.
    4. Enable the option "Allow buttons to be disabled" under the tools menu in Workshop (see the attached image "touch disable buttons.png").

    5. To hide the slider object, make the host write to the user button object the value "0".
    6. To show the slider object, do the following:
    6.a: Disable the user button object by making the host write to it the value "-1".
    6.b: Make the host write to the slider object any valid value.

    Attached are a ViSi-Genie project and an Arduino sketch to illustrate the above.You may have to resize the ViSi-Genie project since it was created using a uLCD-70DT.

    Hope this helps and regards.
    Attached Files
    Doff

    Comment


    • jonj
      jonj commented
      Editing a comment
      Hi Doff,

      I'm also interested in configuring a display with this type of functionality, but there seems to be an issue with downloading the overlap.zip and .png image. Can you check the links or send me an email with those sample files?

      You help is much appreciated.

      Jon

  • #3
    You can apply the same principle to show and hide other objects. You could use a user images object to hide objects that do not have touch detection like labels and LEDs. The following application notes should be able to help you with the basics:

    ViSi-Genie Connecting a 4D Display to an Arduino Host
    http://www.4dsystems.com.au/appnote/4D-AN-00017/

    ViSi-Genie Writing to Genie Objects Using an Arduino Host
    http://www.4dsystems.com.au/appnote/4D-AN-00018/

    ViSi-Genie User Button
    http://www.4dsystems.com.au/appnote/4D-AN-00030/

    ViSi-Genie User Images
    http://www.4dsystems.com.au/appnote/4D-AN-00034/

    http://www.4dsystems.com.au/appnotes
    Doff

    Comment


    • #4
      Hello Doff

      i want to interested in that but i cant understand the properly and also i cant be able to view this zip file because of the png file that png file please give me a separately or guide me .

      Best Regards
      Seggi.

      Comment


      • #5
        Hello Seggi,

        You must be logged in to the forum to be able to download attachments. Also, I believe your inquiry has been handled thru PM by one of my colleagues. Let me know if you still have questions.

        Regards,
        Doff

        Comment


        • #6
          Hello Doff,

          i am having the doubt on a code.

          Best Regards
          seggi

          Comment


          • #7
            Hello Seggi,

            If you are having problems running the attached project, please describe the issue. Thank you.

            Regards,
            Doff
            Doff

            Comment


            • #8
              Hello Doff,

              Glad to say you i am very close to this project.

              Best Regards
              seggi

              Comment

              Working...
              X