Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 2.67 KB

02_Nextion_HMI.md

File metadata and controls

21 lines (11 loc) · 2.67 KB

Nextion HMI

For basic use the deployment of the Nextion HMI firmware is straightforward - simply copy the compiled firmware image to a FAT32-formatted microSD card and apply 5VDC to the power pins on the panel with the card inserted. It should power up the panel, recognize the .TFT file, and update the panel automatically. Once the firmware update has completed you can eject the card and restart the device.

For advanced customization you will need to download the (Windows-only) Nextion editor. You can find instructions on its use here.

The Nextion panel accepts and sends commands over the serial interface. A detailed guide to the Nextion control language can be found here. A mostly-complete list of all available instructions and their use is available here.

Two compiled TFT files are included for the Basic and Enhanced versions of the panel. This project does not currently utilize any features offered in the Enhanced panel.

Once the project is assembled, future updates to the LCD firmware can be handled over-the-air by issuing an MQTT command with a URL to the target TFT file.

How to: Run this software with an ESP8266 but no LCD panel

One feature of the Nextion Editor is the Nextion Simulator, which allows the user to debug an HMI being edited. You've probably used this if you've worked on editing your own HMI file. You can run through the screens using your mouse to issue touch commands and feed it commands and see output in the text boxes provided.

The Nextion simulator allows you to run hardware-in-loop with your microcontroller. If you have a second USB UART kicking around (you could use a second WeMos or Arduino if you have one handy), connect the UART RX to pin D4 and the TX to pin D7 which are the pins you'd use to hook up a real panel. In the Nextion Simulator you can then select "User MCU Input", select your UARTs COM port, set the Baud to 115200, then click Start.

Now the Simulator will accept input from and send output to your flashed ESP8266 without having an LCD panel on hand!

Nextion Editor Simulator