Using buttons with projects

Hi everyone I have encountered a problem :confused: I am trying to make it so that when you press one button it displays the temperature on the LCD until you press the other which will show the time and visa versa. I would really appreciate your help. Thanks in advance.

So what have you tried ?

Do you know how to read the state of an input and test what the state is ?

Post what you tried here.

i havent tried anything as i dont know what to try :slightly_frowning_face:
and yes the button input is working fine

Do you know how to display a temperature on your LCD?

Do you know how to display the time on your LCD?

And you say you know how to read button input.

So that's at least 95% of your program that you could post here.

What is left that you don't know how to do?


The only thing I do not know how to do is to make something display until the other button is pressed, i only need the "wait until" code.

i only need the "wait until" code.

Testing whether an input is HIGH or LOW using if would seem to be useful

Unless I've missed something it sounds like you only need one button.

Press it and display time, press it again display temp, press again back to time and so on.