I want to have a dual-state button with two graphics images:
I only want to change to the second state once the arduino has completed execution of the command.
How do I:
1. Prevent the Nextion display from changing to the second picture as soon as I release the button?
2. Allow the Arduino to tell the button to change to the second picture?
BTW... NICE Button Generators:
you have this example what ??
b0.pic=1 ref b0
With your particular example, both methods will accomplish the same thing. So it probably doesn't matter, but I wanted to offer another approach.
I might suggest, however, that if you use a regular button, you can set a third image in pic2 (it only appears while the button is being pressed) so that the user get's some visual feedback of the button press while they wait for the Arduino to execute the request and change the button.
In my application, I have added a number of pictures to my project that I assign to buttons programmatically. In my case I have three images per button:
Also, you can generate generic button images and overlay text onto a blank button.