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

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

Follow the guide:

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.

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!

Amps and Speakers Contest 2016

Participated in the
Amps and Speakers Contest 2016

Be the First to Share


    • Microcontroller Contest

      Microcontroller Contest
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest



    7 weeks ago

    The music theme is very catchy and has a lot of fun about it.
    Download free ringtones for phones samsung, iphone, xiaomi year 2021 at website: has been updated on the latest system for users.


    Question 5 months ago on Step 4

    do you know where I can find a guide for your link in step 4 now that google+ is no more?


    Question 2 years ago on Step 9

    question since im using a different relay and it has 10 cords in the middle and i think a power supply on the right how would i do step 1? is it still the same? Thanks if you answer!


    Answer 2 years ago

    What relay are you using? A picture would help.


    4 years ago

    It looks really cool :) I love holday light shows!