Go Down

Topic: Code for setting the time with a 5 way tactile switch/buttons (Read 826 times) previous topic - next topic

SouthernAtHeart

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
http://www.sparkfun.com/products/10063

My RTC
http://www.sparkfun.com/products/10160

My LCD
http://www.sparkfun.com/products/11122


Thanks.

florinc

I used just two buttons for setting up the time:
http://timewitharduino.blogspot.ca/2012/04/bookclock-software-update-set-time-from.html[/url]

SouthernAtHeart

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

liudr

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

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=Phi_2_project_alarm_clock_v5.zip&can=2&q=

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

The library for the project:

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=libraries.zip&can=2&q=

http://www.youtube.com/watch?v=r7r4W9s27d4

Go Up