The initial goal of this project was to build a standard Alarm Clock. To do this we would have to interface with an RTC chip using the I2C interface. A RTC Chip is a real time clock that can retain time data even after the power main power has been cycled. This function is performed through the use of a small battery. Unfortunately, we were never able to find the battery needed to operate this chip. This means that we would have to approach our project differently.
This is when we came up with the idea for a sleep timer. The user could set the desired amount of time, default 8 hours, and after the time ran out the alarm would sound. After the alarm was sounded, the user could choose to snooze or let the alarm run. If the alarm runs to completion, the LCD is updated with a “report” of the time slept, including snoozes. Below is a flowchart of the program: