I'm trying to use Alessandro Guarguaglini's Nextion library (GitHub - ilguargua/Nextion-LCD-library: Itead nextion display library for Arduino platform) with the nextion display and a Mega 2560.
I was using ITLead's library, but it was wasting way too much memory.
I have the Nextion display on Serial2 (16/17) with the old library and it worked well. (Aside from the memory gulp.)
I've switch my code around to use Alessandro's library, but can't seem to get a connection between the Mega and the display.
Anyone have suggestions??
Hello Jbenton,
Support for Nextion on these fora is pretty much as follows:
You can follow the methods I set out in using Nextion displays with Arduino. My methods do not use the Nextion libraries, so while I am happy to offer help on using my methods I cannot offer anything very helpful for any Nextion library.
The original Nextion libraries are full of bugs. There is a link from my tutorial to some improved Nextion libraries created by Ray Livingston, I suggest those might be worth trying if you prefer to use a library.
There's also a separate Easy Nextion Library by Seithan, his methods are different to mine, choose which works best for you.
Beyond that the odd person occasionally offers a bit of help but not much.
I do not remember seeing anyone mention anything about Alessandro Guarguaglini's Nextion library in the time I have been here, since July 2018, so I suspect there is no one here who knows anything about it BUT if someone does please offer help!
If you want help on this or any other subject it helps to share what you have done so we have something to work with, please read:
General guidance and
How to use this forum
How to post an image
Thank you.
I just answer to your email, suggesting a fix for a problem with a debug line left uncommented on one file of the library. I hope this will solve your problem, in case let me/us know if you find my library useful.
If somebody else would like to try the library can be found here.
I think it's a little better than the Itead library, at least memory footprint should be lower.
I'll fix the source on github ASAP, in case the line to be commented out is the 239 on file drawing.cpp , the line that contain "serialLogInt("xstr pgm, msg len",strlen_P((char *)msg));", it was over there for debug pourpose, and I forgot to remove it.
Ciao, Ale.
I did get the library running after reading through the library source.
I did reach out to Alessandro Guarguaglini and he did point out an error in the compiling of the library. I didn't have the error, but did update it per his instructions.
I also found my error. The init statement needed all 4 parameters and I wasn't providing them at the time.
Thanks to all!!!!
BTW: This library is quick!
Thanks for the update. That library is completely new to me, no idea it existed.
Someone had posted it in one of the forums, so I gave it shot.
I went from 74% of dynamic memory used to 32% by switching out the libraries!!
I think there is a general opinion that the original Nextion libraries are not very good, hence the various attempts to do something different and better.