Monday, April 23, 2012

Lets build an alarm clock.

It has to be better than a regular alarm clocks in several ways.    The first thing is that the alarm should only sound on work days.  It should not go off on weekdays nor on days on an exception list, these are holidays, no work.

It should slowly begin making chirping noises  a few minutes  before the alarm time that get louder until I wake up enough to punch in a code to turn off the alarm.  If it could turn on some lights over my head even better.   It should go into snooze mode when I hit the snooze button, but this snooze mode should start at 5 minutes but then decrease in time by a minute each time it is triggered so that after 5 times it no longer works.

Once I have punched in the code to wake up  a message is sent out the serial port to the attached computer and it could do things like put up headline news or play a news broadcast that it has downloaded.

It could tell me any appointments I had that day and if anyone had a birthday or other important things in my life.

There should be a real time clock with the alarm times programmed into the eeprom on the arduino.   When a time is triggered, look to see if the event is recuring, and set a new alarm point for the next trigger.

When starting up, look through the list of alarms to see what should be scheduled, taking into account the exception dates.

--

4 th of July 2010 update

At this point the clock is keeping pretty good time.  I am using big number mode on one of the blue 4x20 displays.  I found some <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1215338347/15">example code here</a> to set the seconds, minutes and hours from the cumulative system time.  There is still an overflow at around 50 days to fix before it can be considered bullet proof.

So now that I have the display running and keeping fairly good time, the next step is to add in code to set the time and set one alarm using the rotary switch I figured out how to program the other day.  After one alarm is working, then I want to expand it out to dozens of alarms.  I want to store the alarms in the built in eeprom memory of the arduino chip.

Later I am going to add in an RTC clock to set itself to when it starts and once an hour after that.  After I have the RTC it will be straitforward to handle

No comments:

Post a Comment