Ooooops.. I think I made a mistake and accidentally posted the project twice, on “Arduino Create” AND “Hackster.io”. Please visit: this site to read about our crazy idea. Sorry!
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
Live stream screenshot of our little x-mas wonderland
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, professional 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).