RGB Pixel Clock Part 3

OLYMPUS DIGITAL CAMERA

Now to the arduino sketch running on the clock:
As mentioned before the RGB LED Pixels are controlled using the FastSPI Library (FastSPI).

To get the correct time I used a RTC Module (=Real Time Clock) with the common DS1307 integrated circuit. And for this chip you can find also a ready made library for the arduino. This one is from Adafruit and on their site you can not also find the sources but also some great tutorials for many things. The code for the RTClib is hosted here on GitHub: RTClib

This is the sketch: rgbclock_170313 (updated 17.03.2013)

What I forgot to mention is that I connected a LDR (light dependent resistor) between analog pin 0 (A0) and A1. A1 is configured as output and driven low, while A1 is configured having a pullup resistor. That way a cheap voltage divider is created without the need for an external resistor. The LDR is used to control the brightness of the clock. The code also switches the display mode when the room is too dark.

OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA

 

Leave a Reply

Your email address will not be published. Required fields are marked *


5 − = four

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>