If you are wondering how the beautifully animated graphics find their way onto the display and respond to click and touch to trigger readings or actions, then you've come to the right place.
The answer comes from Itead Studio with your Nextion - HMI-Solution product line. This stands for human machine interface and stands for the interaction between human and display.
But how does that work?
Using an offline IDE - the Nextion Editor (v0.58) - available for Windows - the GUI of the display is designed in peace. This means that from a number of components from the Toolbox, the desired and with the device (the Nextion Display) compatible components on the offline display of the editor are arranged. Then Pages and Attributes as well as Pictures and Fonts or also Video and Audio are added.
The result is stored in an HMI file and imported to the physical display via SD card or USB to TTL adapter. After a restart, the interactive interface is available and can be controlled with various devices.
Prerequisite: Installation of the Nextion Editor and the library for your planned device (note a few adjustments when using the Arduino Uno - for the Mega or Raspberry PI, the library is ready to go immediately). A Nextion Library is also available for the Particle community!
The necessary changes for the Uno can be found in the readme of the library or in the step by step tutorial mentioned below.
A power bank with USB cable for stable power supply with 5V was necessary in my case when using the NX8048P070. With reference to the Arduino, there was a screen flicker.
The examples you will find in the library are often not compatible with the current editor. To solve this, Itead offers an LTS version of the editor for additional download. In the examples you will also find the necessary fonts in "zi" format for creating the HMI file (Button "compile" or "debug").
Optionally, you can also download printable frames as STL files to finish your project.
If you have not yet registered in the forum, the right time would have come after installation. Here you will find a step by step tutorial for Arduino - please take 1 hour to deal with each step carefully.
I put my generated from this example out HMI file in the facilities. Works fine, but the two buttons do not work for me yet - I'm waiting for your feedback ;-) In detail:
The page0 does not switch to page1 as wellD13 LED does not light up.What is it?
With MS Paint I created a simple background graphic according to the size of the physical display and imported it into the editor.
The interaction with the Arduino is done with the help of the sketch, which addresses the individual components of the GUI via serial interface TX / RX.
Instead of the ZI font from the example in step7 "8 × 16 ZI Font file (*.zi)", you can import the ZI file from one of the examples into the editor. Unfortunately, the editor has no option to change the Windows-specific fonts to ZI. Also, the IDE does not come with its own standard ZI fonts with the installation. Too bad.
At the end there is the success: the counter counts up the loop, the color of the buttons and the text changes in dependence.
Overall, I liked it a lot and the possibilities seem endless with the components of the toolbox, the possibility of touch events and the integrated RTC clock. This allows the Nextion Display to be completely self-sufficient, for example, as a clock on the desk. Even self-contained code can be installed.
At the beginning it requires a certain amount of suffering for the skill start-up curve with endurance assets. As a result, you will be rewarded - apart from the otherwise used LCD1602 / LCD2004 or OLE displays.
For the first trial and error, a product from the Basic series is completely sufficient. These are already cheap to get. The specs can be found here for viewing.
The portfolio differs not only within the hardware specs, but also with the components that can be used in the editor toolbox.
Interesting is the classification of the products with letter abbreviations:
Intelligent = PEnhanced = KBasic = TThat does not make sense to me and that still makes me smile.
If you want to document your own circuits, you will also find a matching Fritzing Library with Itead's graphical objects for download.
Let your creativity run wild!
Comments