I want a dual state button on the HMI that is fully controlled by the microcontroller.
The microcontroller must be able to determine whether the button is active or not.
Which means that if the microcontroller makes the button active, then the user can toggle the button, as usual with the dual-state button.
But if the microcontroller makes the button inactive, the button is still displayed on the HMI, but when the user press it nothing should happen.
Now I do this by setting ‘bt0.val=0’ the button to OFF, but the button is not inactive with this.
When a user presses the button, the Nextion HMI will set itself ‘bt0.val’ to ‘1’.
The microcontroller must then quickly send ‘bt0.val=0’ again, to disable the button again, because this button should be inactive.
However, ‘pic2’ of the dual state button becomes visible for a moment, not very nice.
Can this be done differently?
Real men also don’t need a forum to discover the existence of a core Nextion instruction that’s fully documented in the online instruction set guide (which spans all of five pages)
This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).