Synchronised Christmas lights

For the past few years I've usually had a stab at making something with the Cheerlights API - a Thingspeak service that watches tweets hashtagged #cheerlights and extracts the latest colour tweeted. You can then use this to synchronise your lights with others around the world and let others control them.

I've gone from a simple bit of JavaScript, to a single RGB LED powered by a Raspberry Pi to this years advancement - an Arduino that drives a chain of LEDs. I started out with a single-colour RGB strip and then a chain of individually-addressable pixels (which gives a bit more scope for animation). The pixels are a lot easier to work with as they contain all of the components you need to power them and can also power the Arduino from the same 5V supply. The strip requires a few MOSFETs and resistors and a 12V power supply but this isn't enough to power the full 1 metre strip without flickering.

a 5V DC adapter with a female 2.1 mm jack connected to the power leads of the LED chain.

It uses the Adafruit WS2801 library for talking to pixels with serial data. Additionally, I replaced the majority of my HTTP code with this HTTP client library. One caveat is that Thingspeak uses chunked transfer encoding which is a pain when you're dealing with raw HTTP. This library only supports responses with a Content-Length, so I wrote a function to un-chunk the response body.