Code for setting the time with a 5 way tactile switch/buttons

Ive searched around some but can't come up with anything. Seems like I wouldn't be the first to need this. I have a 5way tactile switch (like a joystick), and an LCD display, and an RTC in my project. I wonder if someone has written a nice format for allowing the user to set the clock. If their RTC or LCD is a little different than mine, it wouldn't be that hard to adjust the code for to fit mine.

I'll say I haven't searched diligently, because I can't figure out just how to word a search for this, but I'm sure others have done something like this?

My 5-way tactile switch




I used just two buttons for setting up the time:[/url]

Thanks, I'll check that out. Trying to debounce 5 buttons is starting to make my eyes bounce! :disappointed_relieved:

Here is my code for an arduino alarm clock. Part of it has date and time adjust. Works on arduino 1.0

The project assumes 6 buttons but you can leave the last button empty (it's escape)

The library for the project: