Announcement

Collapse
No announcement yet.

How to enter multiple vars from Arduino to SmartObjects like SmartGauges ???

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

  • How to enter multiple vars from Arduino to SmartObjects like SmartGauges ???

    Hello, anibody can help me to find the way to give to a SmartGauge 2 datas, for artificial horizon ???
    i have layer 1 with the background image (can only rotate on central axis of image)
    and a second layer for same image to go from 0 to 400 ( for up-down image...)
    i don't know howto give 2 informations to the GEN4-ULCD 070DT from the arduino...
    one information by "genie.WriteObject(GENIE_OBJ_ISMARTGAUGE, 0, gaugeVal);" is working, but only 1 axis...
    impossible to find exemples...

    Thank you

    Cédric

  • #2
    Hello Cedric,

    Welcome to the forum.

    When it comes to an artificial horizon, your image set needs to be created in such a way that pitch go's from negative pitch to positive pitch and in between each degree of pitch you have the full range of roll negative to roll positive.

    gaugeVal := ((pitch + pitchMax) * pitchRange) + (roll + rollMax);

    If you have managed to create a set of images for your AI, could you send them to me to see if I can work out the pitch/roll algorithm.

    Best regards

    Paul.

    Comment


    • #3
      Hello Pauleilio...
      Thank you, nice to ear you...
      i manage the thing like this actualy :
      Gen-4ulcd-070DT connected to Arduino UNO with the V2 shield, arduino self powerred by tonel Jack... in 7.5v.

      my SmartGAUGE include only 3 files :
      layer 1 is the "plane" logo (fixed to center...)
      layer 2 is the background (blue/Brown) rotate
      layer 3 is the background (blue/Brown) up & down
      the usefull size is 480/400.

      must i give by arduino only a number that tell to the SmartGauge to print one of the image created ???
      one number for one image ???
      ... i attach you the files...

      Thank you


      Cédric
      Attached Files

      Comment


      • #4
        Hi Cedric,

        Thank you for the images. I will try to do something with these. Did you have a maximum pitch roll degree in mind.

        Paul

        Comment


        • #5
          Hello Pauleilio
          sorry for delay, i'm from France...

          pitch -90° ... 90°
          Roll -180° ... 180°

          Thank you soooo much to take interest...

          Cédric

          Comment


          • #6
            Hi Cedric

            That is ok, Thank you for the information.

            I have been doing the maths for your AI and it may not be possible to do this with a smartguage / userimages.

            -180 to 180 = 360
            -90 to 90 = 180

            so 360 * 180 = 64800 frames

            each frame of 400 x 480 16 bit pixels = 384000 bytes

            total SD memory = 64800 x 384000 = 24883200000 byes which is 24.8832 gb

            It may be possible to do this in code using primitives. This example uses a gen4-uLCD-43DCT https://www.youtube.com/watch?v=Ud_2Ixw4rZg using the page flipping function that is only available on this 4.3 display. It may still be possible to do this without page flipping, I will try to do an example.

            Best regards

            Paul

            Comment


            • #7
              I understand,
              why not, can you give me a code to modify and reach our goal ???
              the exemple would be perfect, for looking how it works, and tune it a little...
              without Visi-Genie, it will be more hard but with a working code, it will be easy to do...

              Thank you, still wayting your return...

              Cédric

              Comment


              • #8
                Hi Cedric,

                Ok, I will try to modify this example to work with your display and simplify the code a little.

                Best regards

                Paul

                Comment


                • Raul
                  Raul commented
                  Editing a comment
                  Buenas tardes, Necesito su ayuda por favor.

                  Tengo uina 4DUINO y al momento de programarla la pantalla me muestra siempre "Mounting" y se queda asi siempre,

                  Muchas gracias.

              • #9
                Hello Pauleilio, any news ???
                thank you

                Cedric

                Comment


                • #10
                  Hi Cedric,

                  Sorry for the delay.

                  The example I showed you doesn't convert that well to your display so I am working on an alternative which should be finished before the end of the week,

                  This version will give you the range of movement at the size you need.

                  Best regards

                  Paul

                  Comment


                  • #11
                    Thank you Pauleilio, sorry for impatience…
                    Cedric

                    Comment


                    • #12
                      This Week is a very long Week… :-(

                      Comment


                      • #13
                        Hi Cedric

                        The core of this is done but at the moment the framerate isn't acceptable and not like the example shown. In that example there was no need to undraw parts that are likey to have changed so it is being done in such a way were undrawing isn't visually noticed which means extar maths.

                        I will get the framerate faster and post it here when finished.

                        Paul

                        Comment


                        • #14
                          thank you Pauleilio, i was thinking that you forget me…
                          ok, still waiting for your solution

                          Cedric

                          Comment


                          • #15
                            Thank you for the done work...
                            but i have found solution myself,
                            very good job done by Pauleilio, no hésitations, by this brand, NO HESITATIONS...

                            Cedric

                            Comment

                            Working...
                            X