Overview:
This is a project I created during the holidays to update a family tradition of making gingerbread houses. The IoT gingerbread house has blinking lights, plays MP3s, and has an internal light that acts as a "fireplace". The fireplace glows red when somebody is naughty, green when everybody is nice, or can just be set to yellow for ambience. Everything in the gingerbread house can be controlled via your wireless device and a web browser (I use my cell phone). The kids are amazed when they see the gingerbread house change color "magically" when nobody is near.
"You better watch out, you better not cry, you better not pout, Im telling you why....."
Demonstration:
Here is a brief video showing the IoT Gingerbread house features
How it works:
The Raspberry Pi runs a nodeJS web server that hosts an HTML page that acts as the client application. You load the HTML page via the URL of the Raspberry Pi onto the web browser of your networked device (for instance on your mobile phone or tablet) . Then, when the buttons are pressed in the client application, calls are made back to the nodeJS web server to REST service end points hosted on the Raspberry Pi. These REST service end points control the pins on the Raspberry Pi that control the lights and also control playing music over the Pi's audio port.
How it was made:
1) This was the recipe I used for the gingerbread cookie dough.
2) Cut the shapes out however you wish. I did a basic A frame house that was big enough to hold the Pi and the LED lights and wiring and an external speaker with a 1/8 headphone jack that I plug into the Pi. 8" long by 7" wide by 7" tall.
3) Before assembling the house, I wired all the LEDs, soldered everything and tested the connections.
4) I used a hot glue gun to attach the LEDs and wiring to the inside of the roof. Once those were dry, the rest of the house as was assembled and decorated using normal frosting.
5) Once everything is assembled, I plug in the Pi and start the nodeJS server (see the Github section for details on the nodeJS server).
6) Lastly, I keep a tab open on my cell phone's browser open to the PI rest site: http://[IP ADDRESS OF PI]:8082/houseControl.html and hit the buttons to control the house.
Merry Christmas, and Happy New Year!
Comments