Unofficial Nextion/TJC User Forum

How test if Nextion is faulty

I have a larger program using Nextion as a display for a watering system.

Last night the Nextion part of the program was working just fine but this morning no contact between the Arduino and the Nextion.

I have tried this simple program to talk to the Nextion but to no avail.

void setup() {

void loop() {
I am using a Mega Pins  18 and 19 connected to the correct Nextion pins.

Am powering Nextion with a seperate 5.3V power supply with a common ground.

Have so far tried a 4832 T and a K nextion.

Have tried 3 different Mega arduinos plus a Uno and no result at all.

The Nextion displays work fine and attribute changes work in Debug but not from the Arduino.

Is there a way to test the Nextions, or is there something really silly that I have overlooked

Assuming you actually got a picture with the id of 2016, the first command looks ok. The second one however doesn’t make sense. Putting it together you get t0HELLO (plus ff ff ff) - while it should be something like t0.txt="HELLO" (plus ff ff ff).
The mix of print and write statements seems confusing, too.

Instead of typing commands by hand into the simulator I’d suggest to use Serial instead of Serial1 and set the simulator to MCU input (bottom left). Adjust the baud rate and open the port. Then you can directly see what the Arduino actually sends and - just as important - what the Nextion screen returns (error codes!). In case that doesn’t make sense to you, feel free to post the screenshots here and I’m sure people will help you.

Oh, and you should edit your post because you included the second half of it within the Arduino code. Just move the ``` from the end of your post to the end of the source code,

Kind regards,

Not exactly sure what I am doing.
The attached" print screen" is the result of the commands in the MCU.
The screen changes exactly as it should but I get nothing on the Simulator return nor the MCU return.

The " STATE’ says “disconnected”.

This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).