For hours i tried to use my Nextion Display with an UNO Board.
So i downloaded the Nextion library and tried to compile the button example.
It stopped compiling with a long error message. I tried to solve the problem an found settings for the uno on the ITEAD homepage:
After typing the new settings given in the picture, i tried to compile again. the compiler works without error messages.
so i connected my UNO on the PC an tried to compile and upload. Compiling worked, but the upload takes 5 minutes until it stopped without success.
What did i do wrong?
I spent hours to solve this problem. So i decided to make this topic on this forum. Can anybody help me?
Here is the error message after stopping the upload:
For days i tried to use my Nextion Display with an NANO Board, as detail:
-Upload the example sketch into Arduino booard ( after modify 2 line in the Nexconfig.h)
-Build a project in Nextion editor correspond to example ( correct ID and click send component ID) and upload in the Nextion display.
-Connect them together and make a test. But the number(0) in the Nextion display not change to 50 and then also not change upon the + or- button.
I dont know what wrong? please show me what i can do to make them work. Thank you so much.
yaa that was my typing mistake
You removed the point?
thank u maratk for your reply.....
i was download the i tead nextion lib, then i copy into installation disk-->ardiuno-->library.
then i try the example program.. then i got these error..
Yuva Raj, how do you set the library? Added archive through the Arduino IDE?
Here is the error. The point is not needed:
If does not work, try to replace #include <Nextion.h> on #include "Nextion.h"
plz anybody help me
friendzzz...... please help me....
i'm using ardiuno uno with nextion HMI display. i need to interface that, i downloaded the library as you referred that and i also was makes as you said changes, but i get these error...... please soul this...
Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"
C:\Program Files (x86)\Arduino\libraries\ITEADLIB_Arduino_Nextion\examples\CompButton\CompButton_v0_32\CompButton_v0_32.ino:20:22: fatal error: Nextion.h.: No such file or directory
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hi, Baarini. Try to delete files NexUpload.cpp & NexUpload.h
I've downloaded the Nextion Library files from github (https://github.com/itead/ITEADLIB_Arduino_Nextion) & pasted them in Arduino libraries folder, then, I copied & replaced your files (SoftwareSerial.h & SoftwareSerial.cpp & Nexconfig.h & NexHardware.cpp) in the Arduino libraries folder & I run the CompNumber example on a UNO board. I got the below errors.
what is wrong with it?
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp: In member function 'bool NexUpload::_searchBaudrate(uint32_t)':
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:111:5: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp: In member function 'void NexUpload::sendCommand(const char*)':
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:125:12: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:130:5: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp: In member function 'uint16_t NexUpload::recvRetString(String&, uint32_t, bool)':
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:145:16: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp: In member function 'bool NexUpload::_setDownloadBaudrate(uint32_t)':
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:183:5: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp: In member function 'bool NexUpload::_downloadTftFile()':
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:211:21: error: 'nexSerial' was not declared in this scope
C:\Users\Documents\Arduino\libraries\ITEADLIB_Arduino_Nextion_master\NexUpload.cpp:225:17: error: 'nexSerial' was not declared in this scope
Just to note that, on UNO boards, when using multiple software serial ports, SoftwareSerial.h allows only 1 software TX/RX port at a time. and, pin # 13 cannot be used. this includes also some limitations on baudrate used ( it shall be <57600)
you may refer to:
It's because the editor needs to talk directly to the display via serial port.
I would use the sdcard. serial is soooo slow.
Hello I had the same issues about nextion library with the uno and found the files helped but when I tried to upload on the editor to the display it would not connect unless I first put a blank sketch into the uno with the adruino compiler ,does anyone know why I had to do this.
thanks a lot !!! It works!!!
Now i can start to experiment with the nextion display.
Thanks a lot Rod! I will try this when i am at home and give some feedback....
With the uno you need to use software serial. See here.
Copy these NexConfig.h , NexHardware.cpp , SoftwareSerial.cpp and SoftwareSerial.h and replace yours.
So your display will run off software serial. RX is pin 10 TX is pin 11. You can change that in the Hardware.cpp file.
There is no dbSerial unless you want to setup another softwareSerial port for it.
And normal Serial is talking to the Uno.
I was where you wer last week. We now use a Arduino mega pro min.