LED Strip Clock

pixelclock-680

I just put together a clock with Adafruit’s 60-NeoPixel LED strip, running off a Teensy 3.0 microcontroller. The flexible 1-meter strip has 60 RGB lights, so different colors represent the second, minute, and hour — you can read it like a normal clock if it’s in a circle, but you can also leave it in a straight line or drape it over something for the Salvador DalĂ­ look.

Version 1 of the clock code advances the second using the delay() command, and moves the minute every 60 seconds and hour every 60 minutes. It’s a good exercise in procedural logic, but loses time quickly.

Version 2 uses a crystal soldered directly onto a Teensy 3.0, which will keep time if you attach a watch battery. Look at the Teensy Time Library page for more info.

The LED clock lets you pick different color schemes, add faint dots every 5 or 15 minutes (or none), and turn on blinking hour “chimes.” Right now you need to set these options in the Arduino IDE and re-upload, but I’ll add the ability to change that with buttons or a knob at some point.

View or download the code here.

pixelclock1

I don’t have any pictures of the final clock in action — I gave it to my dad.

pixelclock2