I was just wondering, why there is an example tutorial with the ITEADUINO UNO at this Link:
But in the API-Documents is written that the library only works for the Mega2560 boards??
And when i copy the example code written in the Link above then i become lots of error messages when i take the Arduino UNO?
Does anybody know the reason? OR is only that Library:
The example http://blog.iteadstudio.com/product-preview-nextion-in-an-arduino-project-2/ was written for the first version of the library. It's not compatible with the new library.
If you use the new library without any change, you need a 'Serial' and 'Serial2' connection. See the file "NexSerialConfig.h" ( https://github.com/itead/ITEADLIB_Arduino_Nextion/blob/master/NexSerialConfig.h ) :
/*Define debug serial*/ #define dbSerial Serial /*Define Nextion serial*/ #define nexSerial Serial2
dbSerial is used to send debug messages to your PC over the USB serial connection, while nexSerial (Serial2) is used to send command messages to the Nextion display.
You may edit the "NexSerialConfig.h" file and change 'Serial2' to 'Serial1' or anything else that works with your MCU board (not necessarily Mega 2560).
Maybe you should update the tutorials, people get lost...