5" esp32 display UART to/from Arduino
Hi I have a project using UART to get data from an arduino board. But the diplay get so busy so the touch stop working. i recseive every 500ms. Is this normal or have i set something up wrong.
//Hans
Serial2.begin(115200, SERIAL_8N1, 43, 44); // Initiera UART2 för kommunikation med Arduino Mega.
if (Serial2.available() > 0) {
// Läs inkommande data från UART2 (RX: IO44, TX: IO43).
String data = Serial2.readStringUntil('\n');
String data = Serial2.readStringUntil('\n')
// Analysera strängen för att få variablerna
float voltage_value = getValue(data, 'V');
float current_value = getValue(data, 'I');
float forward_power_value = getValue(data, 'FP');
float reverse_power_value = getValue(data, 'RP');
float temperature_value = getValue(data, 'T');
float VA = getValue(data, 'VA');
float efficency = getValue(data, 'Eff');
float SWR = getValue(data, 'SWR');
Comments
Hello @SM0PYH
Have you connected the GND of the esp32 uart port to the GND of the arduino?
Is there any error message?
Hi
Yes it is connected and no errors.
I send data from the arduino.
If i sent with 5s interval it works "OK" but thats is far to slow for my purpose.
I am using the USB connection to my coputer at the same time to see whats happening, could that influence?
Hi it was a misstake by me in my code :-( sorry....
The call for reading did happend without any delay at all. seems to work now. i will do some more testing
Still not get it to work.
Should the settings for UART be set like this? ( I am still trying to get data from an Arduino)
Serial1.begin(115200, SERIAL_8N1, 43, 44); // Initiera UART2 för kommunikation med Arduino Mega.
Then serial monitor via USB is also not possible?