I am new to Nextion displays and started my first project with the 4.3" model. I would like to have three check boxes. Therefor I have created three pictures, off, pressed and on. I found a similar project here but it uses not the original Nextion Arduino library. Altough it shows what I would like to achieve.
I was able to get the button pressed animation in the Nextion Editor through Button elements.
My problem is that I don't know how to set the buttons to on/off through my Arduino when they are pressed.
I would be very grateful if you could provide me some help or an example.
I'm not sure, but I think in the button callback, do something like:
sendCommand("b0.pco=2"); sendCommand("ref b0");
Where "b0" is the name of your button, and the new picture ID is 2.
Thank you very much Spirko! With your help I was able to achieve my goal :)