Start a new topic

Selected buttons are erased upon page change

 I have a 3 page project with the following function.

The first page has a few buttons to trigger some events on the arduino

The second page is used for some settings

And the third page is used to display some values (Temperature and Humidity).

When I press a button on the first screen, the button is shown active. This is done by getting the button press by the arduino and then sending a command to show that that button has been pressed.

So far so good.

The problem comes when I exit the first screen and go to any other screen. When I return from the second or third screen to the first (that had the buttons pressed) I can see the the button indicators are erased and the button look like they have not been pressed.

How can I fix this ? Any ideas ?

I have attached my project files if anyone care to take a look.



You can make a global variable. When you return to the first page you need to check the value of this variable to set the correct values for the buttons

Kind regards

Same problem here.

Any example of suggestion how to implement the global variable?

just use a "Dual-State-Button" , there you can set the status manually and keep the status across pages.


(10.7 KB)

Here is an example of how to implement global variables.

Kind regards

Login or Signup to post a comment