Announcement

Collapse
No announcement yet.

UOLED-160-G2 Arduino Leddigits

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

  • UOLED-160-G2 Arduino Leddigits

    Hi,
    I read a temp with Arduino.
    I want to display this temp (float) on my uOLEd160G2 on the Leddigits object (named Leddigits_temp)
    I dont really find which command I need to use;
    like this:
    genie.WriteObject(GENIE_OBJ_LED_DIGITS, 0, temperature);
    but dont works.

    Thanks.

  • #2
    Hi,

    Welcome to the forum!

    I suppose that you are using the genieArduino library.

    As you may know, the library is only applicable to ViSi-Genie Environment which the Goldelox does not support.
    However, you can still communicate with the display using Serial Environment.

    There is a dedicated library for the Goldelox displays and Arduino, please check this link:
    https://github.com/4dsystems/Goldelo...rduino-Library

    Use the ViSi Environment to generate graphics file to a RAW-formatted uSD card, and after that load the display with the SPE program using the Serial Environment.
    To know more about these, here is the application note which you can use as a reference: https://4dsystems.com.au/blog/4d-an-00085/

    I want to display this temp (float) on my uOLEd160G2 on the Leddigits object
    Also, the "Led Digits" only accepts integer value. You will need to map the value to successfully display a floating number on the "Led Digits".
    Multiply the float reading to hundredths (if there are 2 decimal places) and send the value on the display.

    Note: Check if you have 2 decimal places on your Leddigit widget.

    Best Regards,
    Kevin

    Comment


    • #3
      Thanks Kevin,
      I will try with your suggest and link if I understand how to do this.
      I only need 1 decimal and only have 1 decimal in my Leddigit Widget.

      Nobody didnt already do this ?
      Is there no example for this or similar?

      Thks.

      Comment


      • #4
        Originally posted by John Kevin View Post

        Use the ViSi Environment to generate graphics file to a RAW-formatted uSD card, and after that load the display with the SPE program using the Serial Environment.
        To know more about these, here is the application note which you can use as a reference: https://4dsystems.com.au/blog/4d-an-00085/

        I already do this. The result is below (print screen)

        Click image for larger version

Name:	UOLED.jpg
Views:	98
Size:	34.7 KB
ID:	68935


        Comment


        • #5
          Hello,

          Nobody didnt already do this ?
          Is there no example for this or similar?
          Perhaps, you may find this forum thread helpful: https://forum.4dsystems.com.au/node/66093
          It also has a sample program which you can test

          I already do this. The result is below (print screen)
          Have you established the connection between the Display and the Arduino? Please let me know.
          If you'd like, you can attach here a zip file of your project (ViSI and Arduino Sketch), so we can take a look.


          Best Regards,
          Kevin

          Comment


          • #6
            Perhaps, you may find this forum thread helpful: https://forum.4dsystems.com.au/node/66093
            It also has a sample program which you can test
            OK I will check and test.


            Have you established the connection between the Display and the Arduino? Please let me know.
            I dont think because nothing append on the display. I use the 4D Arduino Adaptor Shield II.
            Visi Sketch seem to be ok. I did a loop to increase leddigits on screen and it's work well.



            If you'd like, you can attach here a zip file of your project (ViSI and Arduino Sketch), so we can take a look.
            I will try to resolve. If I cannot I will attach all sketchs.

            Comment


            • #7
              Hi
              I tried with the sample gauge_sample (adapted with my sensor temp) but when the arduino sketch arrive to any ''Display.xxx'' it is blocked; even Display.gfx_Cls() don't work; and nothing else is happening.
              I follow/debug arduino sketch with serial monitor, and I can read good temp value.
              I don't really understand what I need to do with jumper on 4d Arduino adaptor shield. I didn't touch them. May be there is a problem with them and that's why I cannot etablish connection between the Display and the Arduino.
              see jumpers photo bellow :

              Cliquez sur l'image pour la voir en taille réelle   Nom : 		20190711_105647.jpg  Affichages :	1  Taille :		3,02 Mo  ID : 			68990
              Last edited by titi06; 11th July 2019, 10:20 PM.

              Comment


              • #8
                The display stays like that:


                Click image for larger version

Name:	20190711_105832.jpg
Views:	63
Size:	2.82 MB
ID:	68992

                Comment


                • #9
                  Hello,

                  Referring to the Arduino Sketch, it uses Software Serial to communicate with the display (pins 2 and 3 of Arduino).
                  In the attached photo, you are connecting the J3(RX) and J4(TX) of the Arduino Shield to D0 and D1 respectively (pins 0 and 1 of Arduino),
                  which should not be the case, as you need to connect it to D2 and D3 to establish the communication with the display.

                  You should also check for the baud rate of the display you are using, upon loading the SPE program, you should be able to
                  see the baud rate of the display. The baud rate on the Arduino should match the display.

                  For more information, please check this application note
                  Serial Connection to an Arduino Host: https://4dsystems.com.au/blog/4d-an-00092/

                  If you still need further assistance, please don't hesitate to ask.

                  Best Regards,
                  Kevin

                  Comment


                  • #10
                    Hello,
                    I changed for D2 and D3, it's the same.

                    Click image for larger version

Name:	20190712_080527.jpg
Views:	59
Size:	3.03 MB
ID:	69012


                    Led 13 flashing 200ms/200ms

                    Comment


                    • #11
                      Display baud rate 9600 and arduino also 9600

                      Click image for larger version

Name:	display baud.jpg
Views:	76
Size:	98.1 KB
ID:	69014

                      Comment


                      • #12
                        Visi and arduino sketchs attached
                        Attached Files

                        Comment


                        • #13
                          Hello,

                          If you are using the 4D Arduino Adaptor Shield, the reset logic routine should be like this:

                          Code:
                            pinMode(4, OUTPUT);  // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
                            digitalWrite(4, 1);  // Reset the Display via D4
                            delay(100);
                            digitalWrite(4, 0);  // unReset the Display via D4
                          Let me know if that helps.

                          Best Regards,
                          Kevin



                          Comment


                          • #14
                            Yes.
                            I have already changed it.
                            Reset display is Ok, but after it is always the same, when the first command ''Display.gfx.XXX()" is readed the arduino led 13 blink 200ms on and 200ms off
                            And nothing else..
                            Attached Files

                            Comment


                            • #15
                              It seem the execution stay into mycallback() function...

                              Comment

                              Working...
                              X