fungtion Serial.write(0xff); in nextion

can you help me... i dont understand for the fungsion Serial.write(0xff); nextion program in arduino ide ? and then in the instructions web in nextion Serial.write(0xff) print with three line like a

String command = "displayph.txt="" + String(pH + Offset_ph) + """;
Serial.print(command);
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);

Why should it be like that ?thanks

The Nextion display needs three 0xFF at the end of each command.

Serial.write( 0xFF);
Serial.write( 0xFF);
Serial.write( 0xFF);

Or

Serial.print( "\xFF\xFF\xFF");

If you want to know why, then you have to ask the people who designed the software for the Nextion display.

so the function Serial.write(0xff); in nextion is only the end of each command ? if i send the Serial.write(0xff); only one command why not work for the nextion ? can you tell me why does not working

thank you for answer my questions

Serial.print( "\xFF\xFF\xFF");

I didn't know that was possible, thank you :slight_smile: