Control any of the 55 RGB LEDs on the tree, let Santa twerk for you, control a model railroad, or display custom text on an LED dot matrix.
Have you always wanted anyone in the world to be able to control your X-mas decoration in your living room? – No? – We neither, but we built it anyway.
We proudly present: www.controlmyxmastree.com
I had the idea quite a while ago, since I always loved projects where you could control somebody’s X-mas lighting, a robot arm or generally anything over the web and watching it live on stream. But I was never really sure, if there’s anyone else in the world who would dig it and I had no idea how to get requests from anyone on the internet to my Arduino.
Then one day – a few weeks ago – I told a friend what I had in mind and surprisingly he was immediately into it. He’s a computer scientist and said he could program an api on node.js, which would run on a raspberry pi. The concept was born.
I made a quick, professionell and definitely not shitty looking diagram to describe our basic setup:
To sum it up briefly:
We made a simple webpage, which uses ajax to send http POST requests to our api.
The api is a node application which runs on a Raspberry Pi with a fix and from the web available IP. It sends two bytes over a serial port to an Arduino Mega with a custom shield (Why mega? I had one laying around and its multiple serial ports come in very handy for debugging). The first byte we call: “status byte” the second one: “data byte” (in dependence on Midi).
The Mega then runs code which interprets the serial data and controls all the actuators plus LEDs (P9823 / WS2812).