Serial.write(0x35); //record what you see on the display
Serial.write(0xFF); //record what is see on the display.
2. Find the corresponding characters for the operands/arguments of the codes of Step-1 from the following Table; you will be able to understand why is there garbage against the execution of the Serial.write(0xFF); instruction.
johnwasser:
Could it be that Serial Monitor is not a Nextion Display?
PaulS:
What do you think that the Serial Monitor application, that expects ASCII data, should do when you send it binary data?
Well, that is what I would expect (garbage out) when you supply garbage (in).
If the Serial port is being used to communicate with the Nextion display, you should not even be opening the Serial Monitor application.
I just opened the Serial monitor, because the Nextion Display I had wasn't working as expected, so I wanted to debug with the Serial monitor. But I wasn't aware that you can't send Binary Data to the Serial monitor.
But I fixed my problem now. The Nextion just didn't work, because I had other Print commands in my program which disturbed it.
But thank you guys for the Information about the Serial monitor not accepting Binary.
I wasn't aware that you can't send Binary Data to the Serial monitor.
Well, you CAN. It just might not be interpreted by the Serial monitor in the way some other Serial device interprets it.
I wonder if there is a "Nextion Emulator" that will run on a PC/etc for debugging...