Introduction: How to Sync Music to Christmas Lights Using a Raspberry Pi and LightShowPi

I decided to make a step by step tutorial on how to create a Light Show Pi because when I created one there were only scattered information on the Internet .

Items you'll need:

Raspberry Pi Kit

Sainsmart 8 Channel 5V Solid State Relay Module Board

Jumper Wires Male to Female

9 Short Power Cords

16 AWG wire

Christmas Lights

Wire Cutter


Small Flat-head Screwdriver

Step 1: Connecting the Sainsmart 8 Channel Relay to the Raspberry Pi

Connect the Jumper wires from the Raspberry Pi to the Sainsmart Relay Board

- Loosen channel screws

- Connect jumper wires to the corresponding Channels from the Sainsmart to PIN # on the Raspberry Pi

- Male end into the Sainsmart and Female end at the Raspberry Pi

- Should look like pictures above (wire color doesn't matter)

Step 2: Loading the Software Onto the Raspberry Pi

Download latest Rasbian Jessie with PIXEL

Write SD Card Image with Win32 Disk Imager

Boot the Raspberry Pi, connect to Internet, and open a Terminal.

Follow the LightShowPi Guide:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install git-core
# Clone the repository to /home/pi/lightshowpi

cd ~

git clone

# Grab the stable branch

cd lightshowpi

git fetch && git checkout stable

cd /home/pi/lightshowpi

sudo ./

This will take several minutes

Once done type:

sudo reboot

Step 3: Testing the Hardware

After the Raspberry Pi reboots type:

sudo python py/ --state=flash


sudo python py/ --state=fade

The lights on the sainsmart board should now flash if everything is hooked up correctly

If the hardware test doesn't not work please refer to:

Step 4: Wiring Sainsmart Relay Board for Electrical

You will need:

Wire cutter/stripper


14 AWG wire

Daisy chain all wire together like the pictures and wire nuts for the ground and neutral wires. I only linked 4 channels as you can see.

Step 5: Playing Your First Song or Playlist

Refer to the official LightShowPi Guide:

Step 6: Optional: Using SMS to Control Your Show

Step 7: Optional: Setting LightShowPi to Use Audio-In Rather Than an MP3

Refer to the LightShowPi Guide:

Step 8: Run the Show

Add Lights and run the show

Step 9: Help

If help is needed do not hesitate to drop a line in the Community:

Also don't forget to check out the website for new stuff!

Step 10:

Amps and Speakers Contest 2016

Participated in the
Amps and Speakers Contest 2016