Contents
A dual-state button component is a button that can be switched between two states. First of all, I build a new . hmi file, then import all my material pictures and create a font and add it to the fonts window.
What is Nextion HMI?
Nextion is a Human Machine Interface (HMI) solution combining an onboard processor and memory touch display with Nextion Editor software for HMI GUI project development. Using the Nextion Editor software, you can quickly develop the HMI GUI by drag-and-drop components (graphics, text, button, slider etc.)
What does a number component and dual state button nextion do?
A number component is a number variable that can be controlled by other components. A dual-state button component is a button that can be switched between two states. First of all, I build a new .hmi file, then import all my material pictures and create a font and add it to the fonts window.
* Declare a dual state button object [page id:0,component id:1, component name: “bt0\\. * Register a dual state button object to the touch event list. * Dual state button component pop callback function. * In this example,the button’s text value will plus one every time when it is released.
* the License, or (at your option) any later version. * Declare a dual state button object [page id:0,component id:1, component name: “bt0\\. * Register a dual state button object to the touch event list.
Where is the button on the nextion editor?
My Nextion Editor shows the button as ID:9 on page0 named floor. I am not entirely sure if the code below is correct. I had one issue where the upload from the laptop to the Mega wouldn’t finish, but I managed to bypass that issue by disconnecting the Nextion and swapping RX and TX cables from Nextion while the upload was in progress.