Here is my second build - an ultimate alarm clock that is build exactly to my specifications:
- multiple alarms, daily, weekly, on certain days, on certain dates, timer
- automatically dims LCD and LED in darkness (my wife always complains, even covers my clocks)
- multiple alarm sounds, each alarm can have its own sound
- automatic DST
- uses RTC with battery
- hourly chirp, but only in day hours and also automatically suppressed when it is dark
- easy way to enable/disable each alarm or all alrams
- lot of user settings, like the LCD/LED brightness under different light etc.
It is running on a bit modified TimeAlarms library (ingenious how it complements time library), DS1302 RTC, 1602 on I2C and LED 7 segment driven by MAX7219 (Store here was selling only common anode 7 segment so it took a bit convincing to work with 7219 -but works perfectly).
The light sensor is with a photo-resistor on voltage divider to analog input. And the sounds are through RTTTL melodies driven by a simple 1 transistor amp. The menu system is a non blocking interrupt based menu with rotary encoder - my own design, and quite happy about it.
All on ATM 328 - currently I have UNO inside, but I will replace it with my own DIY-duino as soon as I will have some time. I wanted to use originally ebay nano, but I found out it has busted A4 or A5 inputs so no I2C (I've got what I paid for)
I filled the uno to the brim, 98% PRGM and 90% memory - word of advice, don't fill the memory above 90% or you will see some strange things. My I2C display was all acting up, interrupts were random and other funky stuff, until I realized there may be some dynamic allocations in those libraries and if I fill up the memory then boom!
Total time - about a week.