Saturday, May 7, 2011

Sunrise Alarm Clock - May 7, 2011

Before today, the project already:

Connects to a US Navy time website (plaintext time in HTML), downloads, parses, and displays the current time on the LCD screen

Initializes the SD card library and prints the directory contents to the Serial output (functionality copied from SD card example library)

Keeps time fairly accurately, updating to the Navy site every 15 minutes.  In each 15 min interval, the device is fast or slow by less than 15 seconds.

Today:

Created alarm configuration file

Device now loads most alarm settings (time, sunrise duration, alarm song) from the configuration file on the SD card.

Device now beeps high when starting to update time.  Beeps low to warn if updating time failed.

Device now plays tune specified by frequency/duration pairs in the configuration file.

Pictures:

The device in it's box.  While there is a connection for a 9-volt battery, the batteries I have tried die quickly (few minutes to less than a few hours), so the device may draw too much power to be run from 9V batteries...

The LCD display shows the time of the last online time update, the current time, and the alarm time.

The Ethernet board works exceptionally well for this project, providing both Internet access and file access from microSD card.  However, I did have to re-select the pins for the LCD display to avoid interfering with the shield.
Next week:
  • implement calculation of when to update lights
  • add leads for lighting and run a full test (start using at night?)
  • post to arduino project blog

No comments:

Post a Comment