Could someone help me? i've connected some pushbuttons to arduino and an lcd. i want to do something like this:
if i press btn1 then show something on lcd.
if i press btn2 then show something else. i use pulldown resistors for them so i should look if the btns are high at some point then do something but this occur only when i push that btn.. so i want to be able to save that state - when i push btn1
so if i want to show the clock and date in style 3format i should press btn3 and it saves that state
if i want style1 then style3 will became false and style1 true
To solve this, please take some time to study the "blink without delay" sketch, which is one of the examples that came with your Arduino IDE.
Study the sketch and try to find all the lessons in it (yes, I'm implying there's more than a single lesson to be learned).
It's not by chance that i mention this in every and all of my posts through my sign off message.
Read, re-read and play with the sketch to change it and see whether that does what you expected is to do, and why it did not.
As a matter of fact, you already mentioned what you need to do in your question and I'm hoping you'll see that during your studies of said sketch.
Also, in future when building you own sketches, think about what steps you need to take.
Your question tells me that you already did that, so go on with it.
Write each of them down on a piece of paper (or whatever).
Now go over these items and break each of the steps down into smaller steps.
If you do this often enough, you'll end up with an almost finished code.
So take your time doing this and don't try to do things in one evening (if you ever did).