Start a new topic
Solved

Gauges update only on debug from Serial.print

If i send the  following commands, only the text will update on the Nextion 5" display I have. But when I use the Nextion Editor debug and send the same commands from the MCU the gauge needle will move and the text will update.

Serial2.begin(9600);
Serial2.print("z1.val=135");
Serial2.write(0xFF);
Serial2.write(0xFF);
Serial2.write(0xFF);
Serial2.print("t1.txt=\"250\"");
Serial2.write(0xFF);
Serial2.write(0xFF);
Serial2.write(0xFF);


jpg

Can you provide your nextion project file ? 

File 

HMI

you just can refresh the component one by one command in debug mode.

when you use MCU,there are 0xff 0xff 0xff between commands.

It seems that since I have changed the default baud rate from 9600 to 115200 the problem has corrected itself. So the problem I was having was at 9600bps.

The user appears to have found their solution.

This topic will be marked as solved.