Change the Time with 4 Buttons

Hi all I have a question.
To control a Clocktime, i wanna us four Buttons Two for the hours and two for the Minutes.
I know, i have to debounce the hole Thing, but somehow it doesnt will work. Any advices and help?

I think my code looks is in a totally wrong way, so i thankfull for help.
The Debounce Tutorial didnt help me:(

We will need to see your attempt at the sketch
Please use code tags. Use the </> icon in the posting menu. [code] Paste sketch here. [/code]

.

Rusconichess:
but somehow it doesnt will work.

And please also tell us what the code actually does and what you want it to do that is different.

...R

If you are trying to update the time of a clock (Arduino native or additional real time clock) through four buttons, then the debouncing logic is probably the least of your worries. In fact, clock set logic is probably the most complex part of a clock project.
In principle, you have to copy the current time (HH:MM) (if this exists already) and possibly seconds into a buffer , and allow the 2 keys (right,left) to select a digit and, and through up & Down by increments and decrements, update it. If all is well at the end, update the system time with your new time.
You can also do nice things like blink the currently selected digit.
An alternative to the 4 buttons in a stand alone clock (ie does not get is's time from an NTP server or Radio Time Clock etc.) is to use an infra red control.
It is more complex when the clock supports automatic DST compensation, then you not only have to enter the time, but also the date.

[OT]

Rusconichess:
The reason why i dont post my code; i would like to... is that i made many tries and at the end I had so many sketches, that my compuer fallin apart, and all were gone...

That is one of the lamest excuses I ever read. :wink:

[/OT]

To control a Clocktime, i wanna us four Buttons Two for the hours and two for the Minutes.

The button logic is just if-statements. (Sometimes there is 'AND' logic where the "set time" and the "hour' button have to be pushed at the same time.) The button logic should be easy... The harder parts of a clock are reading/writing the time and writing to an LCD display.

I know, i have to debounce the hole Thing, but somehow it doesnt will work. Any advices and help?

I think my code looks is in a totally wrong way, so i thankfull for help.
The Debounce Tutorial didnt help me:(

Well I wanna that one Button makes, by pressing, the hour drops one hour and with the other, that the hour fall at ones, same with minutes.

Its up to you but typically you'd hold down the button and it increments (or decrements) once per second or so. That way you don't have to press it 50 times to move ahead by 50 minutes. And, if you do it that way you don't have to debounce. :wink:

Some clocks will accelerate the counting the longer you hold-down the button... Maybe after 10 counts, it's counting at 5 counts per second...