Hi everyone, I am a new user of UDOO Neo. I am using a 4D Systems Touch display gen4-28PT and here tool Workshop 4 option Visi-Genie, 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() { pinMode(LED_BUILTIN, OUTPUT); Serial0.begin(115200); // For UDOO Neo Serial0 = UART on pin 0 and 1 // For UNO I change it to "Serial". Serial0.available(); genie.Begin(Serial0); genie.AttachEventHandler(myGenieEventHandler); } void loop() { genie.DoEvents(); if (millis() >= waitPeriod) { // Ensure that this code block only runs after ~100ms waitPeriod = millis() + 100; } } // 4D Systems Event Handler. void myGenieEventHandler(void) { genieFrame Event; genie.DequeueEvent(&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 4D Systems Touch Screens, any idea where the problem can be? Best regards.
You will have to check to genieArduino library you are using. Something will be wrong there. Are you not getting any errors?
Hi Waltervl, After a lot of research on various forums, I discovered that the serial port (Serial0 on Pin 0 and 1) of the UDOO card does not support the sequence "0x00". It causes a kind of "crash" of the communication at the level of the buffer of the serial port. However, this character is widely used in the 4D protocol. There is therefore an incompatibility between the two products. I will certainly have to fall back on a touch screen from another manufacturer. Except, if there is a way to get around this while using the Visi-Genie libraries. Best regards.
There is a workaround for this, but only for Serial0 and not for Serial. But you are using Serial0 so modifying your 4D library could solve the issue.... https://www.udoo.org/forum/threads/issue-with-serial0-write-0.5135/#post-28145