Nextion Button
See this example in action: https://youtu.be/lHk6fqDBHyI
The HMI file included in this example needs to be compiled with the Nextion Editor and uploaded to the Nextion display using standard method.
On WEMOS mini D1 (where this example was tested), the Nextion device is connected to RX/TX pins as required. BUT it needs to be disconnected when uploading the firmware.
So the process is:
Make changes to the cpp code
Build it using “make”
Disconnect the Nextion display if it is connected to Rx/Tx.
Upload firmware (built in step 2) using “make flash”.
Connect Nextion display back again to Rx/Tx.
Note
Always unplug the ESP8266 from USB (connecting with computer) or disconnect power before fiddling with the connections between ESP8266 and Nextion display.
References
SoC support
esp32
esp32c2
esp32c3
esp32s2
esp32s3
esp8266
host
rp2040
rp2350