Hack a Day ([info]hackaday_rss) rakstīja,
@ 2013-12-29 09:01:00

Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Fubarino Contest: NTP Clock

fubarino-ntp-clock

[Toni] has been playing around with NTP, the Network Time Protocol. This allows the alarm clock build to keep very accurate time by synchronizing with an NTP server on the Internet.

The project serves as a bedside alarm clock. When it comes time to wake in the morning an alarm sounds and the screen switches from using a blue backlight to using a red one. This is show in the video below, but you’ll want to turn down your speakers before watching it; the alarm sound will have no problem waking you up in the morning. After the unwelcomed jolt you’ll get a glimpse at the Easter Egg which reminds you to check for new posts on Hackaday.

Afraid of ending up with a steaming pile of slag instead of a server [Toni] asked us to host the project files. You can find the first-hand description of the project and a link to the code below.


This is an entry in the Fubarino Contest for a chance at one of the 20 Fubarino SD boards which Microchip has put up as prizes!

NTP Alarm Clock

A few weeks ago I’ve built my own alarm clock. For that purpose I used an Arduino Ethernet and an Adafruit LCD Shield. I decided to use an old cardboard box and fixed both things inside and cut a hole for the power connector, LAN and one for a USB cable which lead to a Usb2Serial adapter (Don’t exactly know how they’re called). Then I added a piezo speaker. Now I’ve a cardboard box with holes and a display. (The clock can be powered by the power plug or by usb, just like any arduino)

Lets come to the software part. First I’ve found this sample code for connecting to NTP servers(http://arduino.cc/en/Tutorial/UdpNTPClient). I included the Library for my RGB LCD and defined some colors. Then a navigation menu was coded. It’s very simple to use: Press “key up” to select Timezone, add or subtract with “right”/”left”. “Key up” again for toggle alarm activation. Done with “select”. “Key down” for Alarm Hour, “key down” again for alarm minute, done with “select”. Then it’s time to go to bed, don’t worry about the background illumination, it gets dark after a few seconds of inactivity, the screen is still slightly visible though.

The next morning you’ll wake up to the nasty alarm sound of this clock. But there’s a challenge. There isn’t a “snooze” or “ShutTheAlarmOff” button. To silence the alarm all that needs to be done is to adjust the alarm time. Just add for example 5 minutes to the alarm time. Soon after that the alarm will ring again, set the time back to the original time, now it’s ready for the next day. Or just toggle activity but remember to reactivate on the evening. You’ll never oversleep because navigating through the menu needs a bit of concentration. After silencing the alarm you’re definitely awake.

But there are still thing left to do: the date once displayed a negative number but I hadn’t the time to check what caused this behavior. Also the screen flickers while in the navigation menu which is just not so nice looking.

But you may now ask yourself where the hackaday.com URL hides. The answer is simple: Every morning I get reminded to check the webpage, just while the alarm is ringing. What a nice start into the day!

Arduino Sketch


Filed under: contests


Neesi iežurnalējies. Iežurnalēties?