Please help me see my error - Ada GFX buttons

Hi... please see attached sketch.

I'm trying to work from the angle of the button_list example from MCUFRIEND TFT touchscreen demos.

Notice i am trying to shift pages where new buttons crop up and do new functions.

The first page works as expected. i.e. page '0'

that allows me to navigate to page '1' and draw it out but then the buttons don't work so gets stuck there.

Why wont the new buttons update on second page? e.g. 'ESC' should let me go back to home page but second page wont operate buttons at all

Thank you!

wholenewbuttonworld.ino (5.3 KB)

here are some images of what the pages look like for context:

You have

  if (currentPage == "1"){

when currentPage is an integer e.g. you need

  if (currentPage == '1'){

I suggest that you put all the keypad buttons into a list. Then you can actually do something.

David.

Please post code in line, using code tags. You can edit the original post to add it, and can expect more help.

I guess you mean when currentPage is a char, don't you?

Sorted! ... Thank you, David.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.