Enhanced Nextion library for Arduino, NodeMcu, Esp8266


As nextion interface library was not well managed/updated… I made a fork from there, and corrected many bugs and enhanced it… There is still to many things to do… But at least it now works better and is more stable, and usable…

Ciao jyberg,
thank you for your effort in this area. In an first “trial” I’ve gone into the waveform stuff.
No doubt, the scaling is a regular issue, which with your library becomes solved from scratch. That’s great.
Unfortunately the documentation has not been maintained in this specific case. I assume here, that the documentation in general has not been taken into consideration improving the code.
To avoid the nasty manual go through of each module to “find out” how it has been improved I’d rather remain on the old and buggy but nevertheless documented library.

Its a pity for your excellent work and invested time if the documentation is not updated accordingly.

Nevertheless best regards


yes library version is not 100% backward compatible and yes it is OK to continue to use original version.
I just wanted to share this version link here becaue it may be usefull for someone, who is faiting with original version problems. As I see that here is good discussion and information sharing about Nection displays.

Library header files functions “documentation” is in same level as original and main changes / enhancements are listed in github readme document. It was not my purpose to document every change/corrected bug. One example in original library getText function was returning read text length. When return value is 0 how you know was readign sucsessfull or was text length 0. So return value changed to bool to indicate sucsess, and lenght as referense in function parameter. There was lot of similar issues.


Ciao jyber,

really I wanted to motivate you to continue your contribution in this and in the same time make you aware, that if the documentation (as an example) is not in line your work might suffer in the usability.

A further observation, concerning always waveform only. My first pitfall using it was that “addValue” was not in .cpp anymore. My first reaction was, to not pursue to use your enhanced library. Wondering, that addValue still continued to work I had a closer look at the .h file - where now, surprisingly, the coding for addValue is.
As and aged developer, as I am, this is a sign that it will take an awful amount of time class by class, function by function to be sure to use them properly - seen that the documentation, examples etc. are definitively not reliable anymore.

Your change, as far that I can judge them, are really worth to use as THE standard with Nextion HMI’s.
The boolean return is a MUST nowadays. Your addittional params in Waveform for scaling facilitate the usage massively. I assume there are lot of further such improvements from you in this enhanced library. But it is really intended to make it so hard to use them on a “trial and error” approach?

Give yourself a push and establish a longterm usable library - we all will highly appreciate and if you’re looking for a donation for this work let us know.


The reason why addValue code is in .h file is that it is template function. So it supports all native datatypes. (Double, float, int, uint…), That causes instantiation problrms if code is in the cpp and declaration in .h files. And yes my purpose is still enhance the library, e.g change it so that it it supports multiple displays, but it requires quite mutch of changes to code base.


I just started to use your library. So far so good. Thanks for the nice work.
However i have a question about NexUpload.
Am i correct that it can olny upload from SD and cant from http or wifi from local http server?

Wrong, you can upload from HTTP

I don’t see where the library discussed in the OP provides anything other than SD transfer but I might be reading that wrong.

Yes library not bring HTTP upload, it icludes original TFT upload interface that manages connection itself and uploads from given file name from SD. I have not tried it.
It is possibe to iplemetn http upload. but you need to manage http server, and upload commands you self. But this is good idea, I may do more streaming type upload interface in some point.

Hi Jyberg. Many thanks for taking on this work, its a great job !.
The Nextion display holds so much promise. I am just trying to decide which version to buy.
I have to be very careful because it must fit into my existing (Arduino Mega2560/Seeed Grove) project. My existing OLED display is literally postage stamp size, I cannot read it, a bigger display would make it much better.
I lean towards the latest “Intelligent” version, so went looking for the library to support it. I am looking for methods that would support graphing. The Waveform method seems to be what I need. I will need to extend it. Somewhere on the Itead site I found text that said the (arduino) library did not support the Intelligent display. It would work as far as it goes, but you have to write your own functions/methods to use the extra functionality by extending other (similar) methods.

So, my question is whether you can comment on whether your revised/debugged library supports the extended functionality in the Intelligent display (or not). (?)


I have not implemented itelligent functionality, as I don’t have it and had no need for it, but libray can be extended and I can merge the proposed enhancement if they are done ok. I did autoscaling support for waveform as I needed it also.

It seems the main added and useful functionality found on the intelligent versions is the ability to use the SD card like a regular one instead of being limited to installation of kernel upgrades and the like.
On the existing version of my project I have an SD card used for logging of results. One entry row every 4 seconds…
The far distant future of my project might see added the ability to see graphs of long term trend results, involving some data analysis.
I will do some more hunting for an open source graphics library to provide the basic framework for common graphs like line, bar, segmented circle etc. If not found then I will try my hand at implementing what I need (line graphs are pertinent to constantly changing discrete sensor readings.)
Thanks for your response and cheers !