Making an accurate microcontroller clock can be a little tricky but you can learn how it’s down by building your own Arduino alarm clock using LED Matrices and a coffee can housing. All of the electronics are based on Wisedino (Arduino with timing capability) and used an LED Matrix shield to display the time. A The clock uses a rotary encoder which the user turns to change the time and set alarms.
Clicking the button will show the state of the alarm (enabled or disabled). Double clicking the button will show the alarm time and allow the user to set the alarm hour and alarm minutes Holding down the button will allow the user to set the time.Another cool feature with this clock is that the closer the clock gets to sounding the alarm, the colors change.
Normally, the time is illuminated in green. Within three hours of the alarm sounding it changes to orange. When it gets to within one hour of sounding the time will change to bright red. So when you awake in the middle of the night all blurry-eyed you can tell how long you have left to sleep by just glancing at the color. I’m definitely a fan of that feature. [Link]