No announcement yet.

uTOLED-20-G2 with Arduino & video stream

  • Filter
  • Time
  • Show
Clear All
new posts

  • uTOLED-20-G2 with Arduino & video stream

    Hello everybody,

    I have a uTOLED-20-G2, i try this App note Interfacing a "4D Display to Arduino"

    o the screen is turn on in a serial mode with the 4D workshop, i upload this program "Hello World" in my arduino:

    This "hello_world_Goldelox" sketch provides a very easy introduction for beginners or Arduino users in
    interfacing any serial-display-module from 4D Systems Pty. Ltd.
    Before using this sketch, the 4D display module to be used must be converted to a serial (SPE) display
    module using the Workshop 4 IDE also provided by 4D Systems. Workshop 4 can be downloaded
    Converting any 4D Systems display to serial display using the SPE tool in Workshop 4 has been covered and
    discussed in the beginning of this application note. In addition, all commands for receiving control,
    controlling or writing to the display is discussed and presented in detail in the GOLDELOX-SPE-COMMAND-SET
    manual.(Note: the uOLED-160-G2 was selected for this tutorial).
    It is strongly recommended then that a cioy of the GOLDELOX-SPE-COMMAND-SET be downloaded and studied to
    give the user an understanding of the wide array of commands available which can be used in any
    Arduino project using any 4D Systems intelligent display module.
    This sketch provides three lines of text strings which if compiled and downloaded to the Arduino board
    be displayed to show plain unformatted text string or a formatted text string ( refer to the 3rd part of
    this sketch.
    // include 4D Systems Goldelox library for Arduino
    #include <Goldelox_Const4D.h>
    #include <Goldelox_Const4DSerial.h>
    #include <Goldelox_Serial_4DLib.h>
    #include <Goldelox_Types4D.h>
    #define DisplaySerial Serial1                      // define display serial port0
    Goldelox_Serial_4DLib Display(&amp;DisplaySerial);    // declare this serial port
    void setup(void)
      //Reset the display, assuming Display is connected to Arduino via 4D Arduino Adaptor Shield
      pinMode(2, OUTPUT); // D2 on Arduino resets the Display
      digitalWrite(2, HIGH); // Reset Display
      delay(100); // 100ms Reset pulse
      digitalWrite(2, LOW); // Disable Reset
      delay(3000);                  // Allow time for the display to initialize before communicating
      Display.TimeLimit4D = 5000 ;  // 5 second timeout on all commands
      DisplaySerial.begin(9600) ;   // initialize serial port and set Baud Rate to 9,600
      Display.gfx_Cls() ;           // clear display
    //  Below this comment is the first string to be serially sent to the display.
      Display.putstr("Hello World\n\n") ;  // send "Hello World" string to display
    //  Below this comment is the second string to be serially sent to the display. Note the double spacing
    //  to provide clarity in the presentation.
      Display.putstr("Serial Display test\n\n\n") ;  //send second string to display
    //  Below this comment is the third string to be serially sent to the display. Again for clarity
    //  in presentation, tripple spacing has been placed and used. Furthermore, this text
    //  string introduces to the user some font and text-formatting capabilities available. There are six(6)
    //  statements before the Display.putstr statement which instructs the Arduino to do this. You can
    //  edit the text string to show the display model you have. Autodetecting the display model is
    //  not covered by this application note.
      Display.txt_Attributes(BOLD + INVERSE + ITALIC + UNDERLINED) ; // change and set new text format
      Display.txt_Xgap(3) ;
      Display.txt_Ygap(3) ;
      Display.txt_BGcolour(RED) ;
      Display.txt_FGcolour(WHITE) ;
      Display.txt_MoveCursor(5, 0) ;                     // use this cursor position
      Display.putstr("uOLED-160-G2 SPE + Arduino\n") ;   //send third string to display
    void loop(void)
     // do nothing here
    I connect the reset on D2, the Rx on Tx1 &amp; Tx on Rx1 (i change Serial1 in my program, i have an Arduino Mega 2560 but i try too with the serial normal, nothing better) and 5V &amp; GND.

    I reset the arduino, the screen reset (SPE Load disappears on the screen) and nothing more appear...

    Had somebody an idea why ?

    Thanks a lot

    I have a second question, If i have a camera video with Rx &amp; Tx output, can i connect it directly on the screen to show the video ?

    Thanks !


    NB Sorry for my bad english :/

  • #2

    What happens if you change

    delay(3000); // Allow time for the display to initialize before communicating


    delay(5000); // Allow time for the display to initialize before communicating

    The display should have the SPE logo displayed, it should clear the screen and then the logo should come back and then the program should run.

    I'm wondering if the 3 second delay is not enough.

    If the 5 second delay doesn't work either raise it to 10, that way the logo should definitely disappear and then come back. Then not what it does after that.


    • #3

      If i have a camera video with Rx & Tx output, can i connect it directly on the screen to show the video ?
      There is a program in the Anna's Sandbox forum which can fetch and display images from the 4D cameras. I presume it could be modified for most other makes of camera. It's unlikely the camera will be able to transfer data fast enough to get 'video' though.


      • #4

        Thanks for your help !

        I try to change the delay at 5s and 10s but nothing better. After the first reset of the screen, the SPE logo doesn't reappear. I must disconnect the reset cable on the D2 so that the SPE logo reappear...


        • #5

          Any other idea ? :/

          For the camera i doesn't see so much thing about that =S My camera is studied to do this, but she had CMOS, analog, Rx&Tx Output, etc... I don't know what is the better to use with my 4D screen.


          • #6

            Can you post a photo of what your Screen logo looks like?

            I can't follow what you are saying about the camera, can you reword it?


            • #7

              What is the better to connect directly the screen to a camera ? Rx&Tx, CMOS, analog, etc... ?

              Thanks so much !


              • #8

                What happens if you reverse the order of the pin command to

                digitalWrite(2, LOW); // Reset Display
                delay(100); // 100ms Reset pulse
                digitalWrite(2, HIGH); // Disable Reset


                What about increasing

                delay(3000); // Allow time for the display to initialize before communicating

                to 5000?


                • #9

                  It's working ! Thanks so much !

                  Other about the camera system have you an idea ?

                  Thanks a lot !


                  • #10

                    I still don't understand the Camera question, eg

                    Rx&Tx, CMOS, analog,

                    can't see the applicability of the names of serial transmit and receive pins, a semiconductor type and the word analogue


                    • #11

                      Hi, tanks a lot for your answers ! I'm back

                      My question is, how can diplay on my T-OLED screen an composite video signal ?

                      Thanks !


                      • #12

                        Sorry, i remake my question. How can i connect a stream Rx/Tx video on my display screen ?

                        Thanks again !


                        • #13

                          Hopefully by now you have gotten familiar with SPE and have had a look at the commands.

                          Amongst them you will find "Blit Com to Display" which is the command to do as close to "stream Rx/Tx video" as you can get.

                          Hopefully you have also done some quick calculations regarding the baud rate and amount of data in one image to realise that this will hardly be "streaming video".


                          • #14

                            Hi, thanks for you feedback !

                            I have read two topics : and
                            nd the SPE command goldbox

                            I have already 'convert' a jpeg as a bitmap image but i don't understand how can i send this on my screen ?
                            I have tested with the Serial Commander in blitComtoDisplay, but when i clic on the Send button, he ask me to add my "GCI" file ? I try with the Graphics Composer 3 to creat my image as a GCI file, but but it gave it: => Attached file

                            And how can I send my image without using the graphics Composer ?

                            Thanks a lot !!! Attached files


                            • #15

                              One more question, i know that the rx and tx bus is too slow. If i can connect directly on the SPI Bus, can i display video streaming ?