Start a new topic

Nextion Display with Arduino Uno: How To

I finally got my 7" Nextion Enhanced display working with the Arduino Uno R3 board.  It took a lot of trial and error and I'm sure there are other ways of doing it but, this is what I did. 

1. Download ITEADLIB_Arduino_Nextion-master from

ITEADLIB Arduino Nextion

2. Setup Arduino Uno with SoftwareSerial according to these instructions.

SoftwareSerial Setup

3. I opend the CompNumber example from the library example folder. There are 3 files CompNumber.HMI, CompNumber.INO and CompNumber.TFT 

4. I opened the CompNumber.HMI file with the Nextion Editor. I then compiled it and got the newly created Compnumber.TFT file (File-->Open Build Folder) and copied to a SD card making sure it was the only .TFT file on the card. I then loaded the file to the display by doing

  •  First power off the display and insert the SD card then power on display.  
  •  When the display shows success message.  
  •  Power off the display and remove the SD card.  
  •  Then Power on display. You should now see the display you have      uploaded. 

5. I Modified the .ino file to use SoftwareSerial as shown in attached CompNumber.ino file.

6. Upload the attached file and run. When the "+ Button" is touched the number should incremrnt and when the "- Button" is touched the number should decrement.

That's it. It is enoubn for me to start experimenting and using the display.

I hope you find this information useful and it helps getting you started.


(3.13 KB)

2 people like this idea

Please - why post MEGA in UNO

 - surely if UNO modifications were made to config

   then failure for Mega should be expected.  No?

Please tell us more:

How did you connect your Nextion to your Mega?

Have you changed anything in your Config.h ?

Make sure the power source can handle the Nextion!

I am attaching files and images.


Make sure you've closed the Arduino IDE program, during the test!


Sorry I don't have logic analyzer

And what does the logic analyzer tell? Which byte sequences go from Mega to Nextion and which go from Nextion to Mega?



Take a logic analyzer and have a look onto the serial communication between the Mega and the Nextion. Thus, you can immediately diagnose the problem.

To which default baud rate did you set your Nextion?

I even tried what Gene Dell suggested but nothing is working for me. please help

 I have Nextion NX8048k050_11 and Arduino mega. I am trying to run examples given in library. I have Nextion editor 0.47. I followed all steps but I am not getting anything on serial port on touching the button.

for example I am trying CompNumber Example

It is showing something like this on serial

recvRetCommandFinished err
recvRetCommandFinished err
setup done




Library is installed through the IDE

Sketch -> Include Library -> Add .ZIP Library ...

(corrected above)

> ... gives me "this error".

What error.  Any error given tells of nature

 - based on nature - determines exactly how to fix.

Such is an issue for their forums and documentation

I downloaded the entire library of ITEADLIB Arduino Nextion and put it in the libraries directory.The library contains the Nextion.h folder., But it does give me this error.Should I remove the Nextion.h library and paste it into a separate directory?How to name it?

(75.4 KB)

In your ino, you include the Nextion.h library. But to compile, it must not only be included, it has to be installed in the correct user library directory, so that Arduino 1.8.2 might find it and accept NexText class declarations.

Hallo pleas code 


I can not compile it in ide 1.8.2.Reports an error

entryapp-gene:31: error: 'NexText' does not name a type

 NexText t0 = NexText(0, 3, "t0");

Pleas help . thank you

 @ Gene,

Thanks for sharing this SoftSerial part.

It makes it more easier to use a Atmel 328 based chip.

I've tested some more setups, like the hardware serial.

(after disabling the #define DEBUG_SERIAL_ENABLE)

Both are working fine without any problems.

The only thing what can happen, is the communication from the FTDI chip.

In both (SoftSerial and hardware serial) it can happen by powering the set with a USB output, that they can't connect to the Nextion.

For sure when you running Arduino IDE, because it's looking/searching for hardware !

Most time after uploading the sketch, it all go's well...

When I re-boot (power off/on) the Nano and I still running Arduino IDE, it go's wrong.

The Red LED onboard starts flashing, after I've closed Arduino IDE, the connection is OK.

(if the Red LED isn't flashing, the communication is OK between the Arduino board and the Nextion.)

During this tests, I was running at Arduino IDE 1.6.8 and Nextion library 080.

Login or Signup to post a comment