No announcement yet.

UDOO Neo + gen4-28PT (over UART) + Visi-Genie : Not working.

  • Filter
  • Time
  • Show
Clear All
new posts

  • UDOO Neo + gen4-28PT (over UART) + Visi-Genie : Not working.

    Hi everyone,

    I am a new user of 4D Systems displays.

    I am using a gen4-28PT and Visi-Genie option in Workshop 4, for drawing my Forms. The screen communicates in UART on Pin 0 and 1.

    The test project is simple. 2 Forms, some buttons, LED digits and a text area. Nothing particular on screen.

    The Arduino code I'm using is as follows:

    #include <genieArduino.h>

    Genie genie;

    #define LED_BUILTIN 13

    unsigned long waitPeriod = 200L;

    void setup() {

    // For UDOO Neo Serial0 = UART on pin 0 and 1 // For UNO I change it to "Serial".


    void loop() {

    if (millis() >= waitPeriod)
    // Ensure that this code block only runs after ~100ms
    waitPeriod = millis() + 100;

    // 4D Systems Event Handler.
    void myGenieEventHandler(void) {
    genieFrame Event;

    if (Event.reportObject.cmd == GENIE_REPORT_EVENT)
    if (Event.reportObject.object == GENIE_OBJ_WINBUTTON)

    // "WinButton0".
    if (Event.reportObject.index == 0) // Index 0 du bouton.
    digitalWrite(LED_BUILTIN, HIGH); // turn the LED on.
    genie.WriteObject(GENIE_OBJ_USER_LED, 0, 50);
    genie.WriteObject(GENIE_OBJ_FORM, 1, 0);

    // "WinButton1".
    if (Event.reportObject.index == 1) // Index 0 du bouton.
    digitalWrite(LED_BUILTIN, LOW); // turn the LED off.
    genie.WriteObject(GENIE_OBJ_USER_LED, 0, 30);
    genie.WriteObject(GENIE_OBJ_FORM, 1, 0);


    The observation is that the project works fine on an Arduino UNO, but not on a UDOO Neo and I don't see where the problem is.

    I see that there is an exchange, because by pressing the buttons on the screen I manage to turn LED 13 on and off. But, when I send the instruction to change FORM or to display a DIGIT LED another value ... then nothing happens.

    I tested the UART of the UDOO Neo, it's sending data. I checked the speed, the rate, etc ... everything seems fine.

    Does anyone in the community have any experience with UDOO Neo card, any idea where the problem can be?

    Best regards.

  • #2

    You can try uploading this simple program in which you can try sending some serial data and the display will send it back; with this you can check if your communication is working properly between the host and the display. Its default baud rate is at 115200.

    Best Regards,
    Attached Files


    • #3
      Hello Jerson,

      First of all, thank you for your feedback.

      I have tested the Serial_Echo program and I get what I send back. The test is OK. I see, you use the "Designer" mode. I am not a specialist like you, which is why I preferred to use the "Visi-Genie" mode, which is easier and faster to implement over the Arduino "Genie" library.

      In the documentation of the UDOO Neo, concerning the Arduino part, the manufacturer displays some "particularities" compared to a classic Arduino. Below are the remarks and links.

      Can these specificities have an impact on the interaction of your touch screen when developing in "Visi-Genie" mode?

      Link :

      Here is a summary of the remarks :

      1. Arduino UNO logic works on 5V. UDOO Neo instead works at 3.3V. As consequence, the analog reference voltage is GROUND and AREF is set to 3.3V.

      2. Arduino String issue :

      There are rules to obey due to the different implementation from Arduino.

      Fixed size allocation.
      Strings that are declared inside a function are allocated automatically at a fixed size. This size is managed through the STRING_STACK_SIZE define in the Wstring.cpp file, that is by default settings equal to 255.

      While if (inChar == '\n') is a non-working syntax, if (inChar == '0x0D') works fine. This is found in several examples that retrieve a String from a serial.

      Do you think that these specificities can have an impact when we develop in "Visi-Genie" mode?

      Bests regards.


      • #4
        Hello Jerson,

        An other information that I found about difference from a UDOO Neo with a standard Arduino is :

        For the UDOO Neo, in the Arduino IDE you can access to this UART using the object Serial0.

        Serial0.begin(115200); // Init the Serial at 115200 baudrate
        Serial0.available(); // get the number of incoming bytes; // get the first byte in FIFO buffer

        Serial0.write(); // write on output buffer byte array
        Serial0.print(); // write on output buffer char array
        Serial0.println(); // write on output buffer char array plus newline char

        The red and green differences have perhaps an importance in the "Visi-Genie mode" and exchanges with the Arduino "Genie" library? Can this bee possible?

        Best regards.


        • #5
          Good day,

          Sorry for the delayed response. It may be possible that the serial handling in the UDOO Neo is not that compatible with the display module. Maybe you could try using the beta Arduino library for ViSi-genie and see if it helps.

          Best Regards,


          • #6
            Hi Jerson,

            I thank you for your feedback. I will test the Beta version and keep you informed.

            After further researching for UDOO Neo, I found information that says that the UART port (Serial0 on pin 0 and 1) fails to digest the sequence 0x00. :-(

            But as in Visi-Genie, the 0x00 sequence is found everywhere in the exchange protocol between the screen and the board, this poses a problem.

            By means of an adaptation in the Arduino library, is there a possibility of bypassing it? Or exchange 0x00 with an other think?

            Best Regards.


            • #7

              If the issue is hardware processing, you can bypass that entirely by using software serial or something similar.

              Best Regards,