My first Arduino project is an alarm clock with dawn simulation, to which I have added every feature I can think of. Here is an outline of the what the project contains:
Maxim DS32B35 RTC. Keeps the time, has battery backup, alarm interrupt, and provides a 1kHz signal used to sound the buzzer. It has 2048 bytes of non-volatile memory I'm not putting to use yet (any ideas....), as well as a temperature measurement that I read out. On the I2C bus.
ADXL345 Accelerometer. Pick up and tilt the clock to adjust the time and alarm (rate of time change is proportional to tilt angle). I also use the tap detection function as a snooze button (10 more minutes of sleep by tapping the table the alarm rests on). One the I2C bus.
Sparkfun Level Converter. Converts the 5V I2C signals to 3.3V for the the accelerometer and RTC.
3W Cree LEDS. I am using a TIP120 darlington transistor to switch on the LED driver (a unit I purchased for ~$3 from DealExtreme). I connected an Arduino PWM output to the Enable pin of the LED driver chip so I can adjust the brightness (dawn simulation).
Photocell. If there is too much ambient light, the alarm will turn on a buzzer instead of the LEDs (not yet implemented in the software).
2x16 Character LCD. This is the only part I'm not too happy with, as I don't like light leakage associated with the backlight. Displays time, alarm setting, and the temperature.
DS18B20 Temperature Sensor. I added this sensor before I realized I had a temperature sensor inside the RTC chip. This one is nice because it has a resolution down to 0.1F.
A Button. Hold down 3 seconds and release to allow changing of alarm time. Then, press and hold to allow changing of the time (or release to end set mode).
As this project is mostly about learning for me, the interaction with the I2C devices (RTC, accelerometer) is done using the Wire library, as opposed to any libraries created specifically for these devices. Similarly, I am communicating the the DS18B20 using the OneWire library, as opposed to library specifically created for this chip. I still need to case it up, and put the finishing touches on the software. Any other ideas of things to add? I think it would be neat if I could somehow project the time onto the wall. Just thought of one more idea: A downward-facing proximity sensor to detect when it has been lifted (and then go right to the alarm setting mode).


