Announcement

Collapse
No announcement yet.

Display specific frame in Movie/GIF from an Arduino

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

  • Display specific frame in Movie/GIF from an Arduino

    I am so frustrated trying to achieve something that I know should be very simple to do.

    I have a ViSi project loaded on a Diablo screen and that works fine. (NOT Visi Genie)
    All I want to do is display a specific frame in an animated GIF.

    What libraries need to be included on the Arduino? Is it just #include <genieArduino.h> or do I need other libraries too?

    What command do I use on the Arduino?
    I have tried genie.WriteObject(GENIE_OBJ_VIDEO, 0x00, 50); but that does not work.

    Some sample Arduino code would be nice.

  • #2
    Hi,

    It might be best to try to do this from Visi-Genie. Visi doesn't have any serial handling protocols built in so in Visi you would need make your own to recieve commands from the Arduino.

    When using Visi-Genie you only need the genieArduino.h

    This application note might be useful as a guide in controlling objects via an Arduino

    https://docs.4dsystems.com.au/app-note/4D-AN-00018

    Best regards

    Paul

    Comment


    • #3
      Hmmmmmm... I did not see that documented anywhere.
      Anyway, I had already decided to give ViSi Genie a try and am in the process of building a new project in that environment.

      One more question, given that in ViSi Genie there does not appear to be a code window...
      How/Where do I set the transparency colour for the GIF and enable it. Is that done from the Arduino? If not, where is it done?

      Comment


      • #4
        Hi,

        There can be some advantages to using your own protocol from Visi as you can make your own serial commands but it can become a bit complex trying to keep it in sync.

        Transparency is not supported in the Visi-Genie protocol however the ability to add code to a Visi-Genie project can be achieved by using Magic Code which is available in our Pro version of Workshop 4. With Magic code you could set the transparency colour and switch transparency on.

        Another option, but this can be a bit daunting, is to save the compiled Visi-Genie project as a Visi project. By doing this it would be possible to add code to the working Genie program with all the Genie serial & touch handling already coded. The code for Visi-Genie is very complex but adding things like transparency before the repeat forever loop could be quite easy to achieve. To do this you just need to click on Save As and then change the file type to Visi Projects. I find it easier to save the Visi program to a different folder to the Visi-Genie project.

        Best regards

        Paul

        Comment


        • #5
          I understand that the pro license opens up many other customization options, but having to buy a license just to have transparency in a GIF seems somewhat extreme.
          Maybe the 4D developers might consider adding the ability to set the transparency colour and give the user the ability to turn this feature on or off for a movie object in ViSi Genie.

          Out of interest, how would you use Magic Code to set the transparency colour and turn the transparency on?

          All the above said, the method you described to get around this problem seems to work, so I thank you for that information.
          Last edited by SkiFreak; 4 August 2020, 12:08 AM.

          Comment


          • #6
            Hi,

            There is another way you could do this without transparency. Say if the GIF was a circular object and you didn't want it to overwrite digits in the center you could split the circular object into seperate image sets like left top and right sections If that makes any sense.

            Best regards

            Paul

            Comment


            • #7
              And another way, and the way I am doing it now, is to select one of the screens that end in -AR
              I use Extended Graphics, which gives me the drag and drop functionality of ViSi Genie but allows me full use the serial library to control everything, which gives far more freedom with my project.

              It is a pity that I did not find this option first, but from what I have seen, Extended Graphics is only given a passing mention in one of the Application Notes I read (and I have read lots of them).

              Comment


              • #8
                Hi,


                Sorry about that, yes the extended graphics can be very useful. Quite often users will opt for using the Arduino IDE anyway so we may treat it as a choice thing rather than not being aware that the extended graphics exist. If a AR screen is purchased it naturally opens up on that screens selection as you have found out.

                I'll make a note of it and see how we can make it more accessible to the user.

                Thanks for letting me know.

                Best regards

                Paul

                Comment

                Working...
                X