System76 is built on web technologies written in JavaScript.

Your browser currently has JavaScript disabled. Some pages and features will not work as intended.

System76 is built on web technologies your browser doesn't support.

If you have questions about an order, or require support, feel free to contact us.

Dismiss Learn More
Special Offers New Thelio Veneer Colors Now Available!
Do-it-yourself holday light show

See the inspiration!

…now make the project!

Collect materials

Install Raspbian on the Raspberry Pi

  1. Download the Raspbian OS to install on your Raspberry Pi from
  2. Click the Download ZIP button under NOOBS (offline and network install), and select a folder in which to save it.
  3. Extract the files from the zip.
  4. Insert your SD card into your computer’s SD card reader.
  5. Copy all the files in the extracted NOOBS folder to the SD card drive.
  6. After the copy finishes, safely remove the SD card and insert it into the Raspberry Pi.
  7. Plug your keyboard, mouse, monitor, and USB WiFi adapter into the Raspberry Pi.
  8. Plug the USB power cable into the Raspberry Pi.
  9. The Raspberry Pi will boot and a window will appear with a list of different operating systems to install. Tick the box next to Raspbian and click Install.
  10. The default login for Raspbian is username pi with the password raspberry. (NOTE: You will not see any writing appear when you type the password. This is a security feature in Linux.)

Configure the Raspberry Pi

  1. Click the network icon (Raspbian network icon) on the top-right and connect to your wireless network.
  2. Click the terminal icon (Raspbian network icon) on the top-left to open the Terminal app.
  3. In the terminal, type ifconfig and hit Enter to get your IP address. It will look something like inet addr: but with a different number.
  4. Go to your laptop or desktop computer.
    • If in Linux or OS X, open a terminal and type ssh pi@ (change to the IP address from the previous step), then enter the password raspberry when prompted.
    • If in Windows, you can use PuTTY to remote into the Raspberry Pi.
  5. Now you can disconnect the monitor, keyboard, and mouse from the Raspberry Pi and interact with it remotely!

Install & configure software

The commands in the following steps will be typed into the terminal or PuTTY after remoting into the Raspberry Pi. Remember to type the password raspberry if prompted.

  1. Update the Raspberry Pi’s software:
    sudo apt-get update && sudo apt-get dist-upgrade
    sudo reboot
  2. Install Timidity Daemon and make Timidity listen on the standard MIDI port:
    sudo apt-get install timidity-daemon
    aconnect  14:0 128:0
  3. Set audio output to the headphone jack:
    sudo amixer cset numid=3 1
  4. Install ALSA libraries:
    sudo apt-get install libasound2-dev
  5. Install Light Organ:
    git clone
    cd light-organ/
    make && sudo make install
  6. Start Light Organ then go back to your home folder:
    sudo ./lightorgan
  7. Download the MIDI file for a Christmas song. We’re using Carol of the Bells as an example:
  8. Play the MIDI file (If you plug in speakers or a headphone jack, you can hear playback out of the headphone jack. You can plug in the FM transmitter and tune it to an unused FM channel to hear the music over the radio.):
    aplaymidi --port 14 carol-of-the-bells.mid

Connect the wiring

  1. First, we’ll start by wiring the Raspberry Pi to the 8 Channel Relay. Below is a pin diagram for the Raspberry Pi. Pins

    The Relay has a set of 10 pins along the side. The left most pin is Ground. The right most pin is Power. The Raspberry Pi provides power to the Relay. Use your jumper wires to connect the pins.

  2. Next, using the above pin diagram, connect Pin 0 to IN1, Pin 1 to IN2, and so forth.
  3. Now we’ll prepare the outlet wiring. Start by cutting the end off of the power strip, stripping about a half inch of shielding off the wires, and pushing it through one of the holes in the three gang box.
  4. We’re going to use 6 of the 8 relays. Cut 6 black and 6 red pieces of the 14 gauge wire about 1 foot long. Cut 2 pieces of the black wire about 6 inches long—we’ll use these as pigtails for easier wiring in the box. Cut 4 pieces of white wire 8 inches long.
  5. Connect the six 1-foot-long black and red wires to the relay at relays 1, 2, 3, 4, 5, and 6. Black in the center post and red in the left post of each relay.
  6. Push the wires through the three gang box holes. Use the wing nut wire connectors to connect three of the black wires and one of the pigtail wires. Connect another three black wires and a pigtail. Then connect the pigtails to the black wire coming from the plug wire.
  7. Now we’re ready to wire the outlets. First, we’ll wire the positive side of the outlets. Look at the right side of the outlet and you’ll notice a piece of metal connecting the two gold screws. Break off the piece of metal so it looks like the below picture. Do this on each outlet. This separates the top and bottom outlet so we can control them independently.
  8. Wire one red wire to each gold screw. Once complete, you’ve wired the positive side of the outlets.
  9. Next, we’ll wire the neutral side and ground. The neutral side of the outlet is the left side with silver screws and the green ground screw.

    Neutrals are all connected together, so we leave the metal tab connecting the two screws. Grounds are also wired together.

    First, connect the white wire from the plug to one of the neutral screw terminals. Then use the white wires you cut earlier to connect the second screw to the neutral screw on the next outlet.

    Finally, connect the last outlet in the same way.

  10. While we’re here, we’re going to connect the ground wires as well. Connect the ground from the plug wire to the first outlet ground screw and also wrap another one of the extra white wires to the same screw. Connect the next outlet’s ground screw to this wire and so forth to the last outlet.
    Live electricity! Approach with caution and adult supervision!
  11. Now screw the outlets into the box and plug in your Christmas lights. Also, plug in the plug from the 3 gang box. Once you plug in the box, the relay board and outlets are hot, so be careful! Touching the sides of the outlets or the bottom of the relay board can electrocute you.
  12. Now connect to the Raspberry Pi from your laptop or desktop. Use your IP address from earlier.
    ssh pi@
  13. Start Light Organ. The lights will turn on.
    cd ~/light-organ/
    sudo ./lightorgan
  14. Start playing Christmas music…
    aconnect  14:0 128:0
    aplaymidi --port 14 carol-of-the-bells.mid
  15. Marvel at your creation!

Notes & Resources

This guide gets you started. Now you understand how to connect to and control your Raspberry Pi remotely. You've learned to wire the Pi to control a relay and how to manipulate AC power objects (lights in this case). You can scale your creation to power a light show for your Christmas Tree or your entire house. Maybe you can imagine how you might open curtains when the sun rises, control fans and cameras from anywhere, or create and control digital signs.

Huge thanks to all the online resources we used to learn from and create this how to. There's lots of great information in many of them. Please visit them to learn more.

Zac Vineyard
Building a Christmas Music Light Show with a Raspberry Pi
Chivalry Timberz
Wrote Light Organ and has lots of great information on his blog, including a newer version of Light Organ that we didn't use in this how-to:
Raspberry Pi Lights: how to sync Christmas lights to midi audio
Wrote a nice how-to on
Raspberry Pi Christmas Tree Light Show
Todd Giles
Documented another way to control Christmas lights using MP3s instead of MIDI files:
lightshowPi on Bitbucket