- Learn Linux
- Learn Electronics
- Raspberry Pi
- LPI certification
- News & Reviews
This project is a Christmas house based around a 3D printed building and a Raspberry Pi with additional electronics to light up LEDs, change the colour of a snowman using a NeoPixel LED and to control a smoke generator to have smoke appear out of the chimney.
The building is designed in TinkerCAD and printed on a 3D printer. It is based on a weigh bridge building for a model railway, but makes a nice size for a Christmas themed house.
See the following page for details about 3D printed G-Scale model railway building
This is the design of the breadboard and schematic diagram showing a step-by-step tutorial of how to create these using Fritzing. Using the schematic diagram for the initial circuit design and then using a breadboard to prototype the circuit.
This next video goes step-by-step through creating a printed circuit board (PCB) in Fritzing. The end PCB is like a Raspberry Pi HAT (although it is simplified so does not meet all the requirements of a HAT).
There are a few steps involved as the NeoPixel LED needs software libraries to be installed. This is explained below.
First you will need to disable sound on the Raspberry Pi. This is due to the sound and NeoPixel drivers conflicting with each other.
Create a new blacklist file using
sudo nano /etc/modprobe.d/snd-blacklist.conf
Add the following entry
Then save and exit (Ctrl-O Ctrl-X).
The next stage is to install the library code that will control the NeoPixels. This is installed by running the following command:
sudo pip install rpi_ws281x
You can then download the code which will control the house. This includes a simple script that activates the lights and a graphical program (using Pygame Zero) that will allow you to control the house with a mouse.
After downloading the file you can extract the files using:
tar -xvzf christmas-house.tgz
The graphical application is creating using pygame zero and also needs to be run as root. First change to the directory with the files then run:
sudo pgzrun house.py
Please view the copyright information regarding use of the circuits.