Digital clock with date and weather

This is a project I started both to learn more about electronics and because I needed a clock for the workshop. The resulting clock I built has a 4-digit time display with yellow 7-segment LED-displays and a LCD that shows the current date, week and weather. The clock is powered by an Arduino connected to a server that sends updates to it every five minutes.

Each of the 7-segment displays is connected to a shift register so that I can control all 32 LEDs with only 3 pins on the Arduino. Each shift register has 8 outputs and they can be daisy chained so only one of them has to be directly connected to the Arduino.

I found this tutorial that describes how to do this. Since I wired my displays the easiest way possible (just connect everything and figure out which pin controls what later) I had to rewrite the character map but otherwise the code in the tutorial was very helpful.

I also connected an LCD to the Ardiuno so I could display some more information like date, week and weather. This information is sent to the Arduino over USB. To do this I created a small python script that uses serial to communicate with the arduino and pywapi to get weather data. The script also sends the current date and time to both avoid handling dates in the Arduino code and avoiding clock skew. Since the server that the clock is connected to uses ntpd the clock always shows the right time.

Ludvig Widman
Posted:
Sep 10, 10:15 PM

Comment

Commenting is closed for this article.