When the festive music takes over the Cyber-Duck speakers, we know it’s time to kick-start our Christmas project. This year, we’ve gone for something more than a bit different. Playing with the Internet of Things concept, we’ve built a Santa that responds to online activity – tweet @Cyberduck_UK and #makesantadance to see his moves via our live webcam, and be wished a Merry Christmas! I’m going behind the scenes to cover why and how we built this project.
The Internet of Things is about making everyday objects connect, share data and react to the Internet. Although interest has grown dramatically in the past 12 months, there are few practical projects testing the potential of the Internet of Things, or the technologies that must be integrated. It was the perfect opportunity to theme an R&D project around having a bit of fun with a Christmas decoration – in this case, a 6ft dancing Santa. By tweeting #makesantadance at @Cyberduck_uk, Twitter users can see his moves at Cyber-Duck HQ via our live webcam, and receive a Christmas message just for them.
Aiming to complete the ambitious project in a short timescale, we mobilised the Ducks to plan the components and applications required. After a quick whiteboard session, we agreed on the technological elements and sketched a low-fidelity design for the web app, ready to apply some Photoshop magic.
We planned to display a Christmas greeting on an iPad, secured to Santa’s belt as he danced. The core of the system would be responsible for receiving the tweets, displaying the message and triggering movement. NodeJS was the technology of choice to handle this; it provides an event-driven architecture, successfully used for real-time applications just like ours.
In combination with the Twitter streaming API, we can subscribe to push any tweets with the hashtag #makesantadance. Once a tweet has been received, the system sends a signal to a Spark core: a small Wi-Fi enabled module, which allows Santa to interact with the Internet through a cloud-based API. By replacing Santa’s original offline movement detector with this system, we were able to activate the dance via the web, in response to social media.
This combination of technologies proved to be a versatile solution for the campaign as a whole, as the NodeJS server is also able to host the makesantadance.com web application. Integrating video was our last substantial task; we connected a webcam to the Raspberry Pi, aiming to run a video-streaming server. After spending plenty of time fiddling with different options to achieve real-time video (with little performance cost), we opted for an mjpg streamer, which could send video directly to most modern browsers.
The Internet of Things is a growing trend, and we’re looking forward to seeing more real applications of the idea next year. For example, this technology would be perfect for retailers aiming to impress with intricate shop windows – we’d love to see the figures move and react to their vast social media following!
We enjoyed building Santa, as a fun, original way to wish you all a very Merry Christmas from the team here at Cyber-Duck! If you’d like to hear more about our creative R&D efforts, or work on a project like this with us, please get in touch.