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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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


    • Arduino Contest 2020

      Arduino Contest 2020
    • First Time Author Contest

      First Time Author Contest
    • Space Challenge

      Space Challenge

    3 Discussions


    Question 1 year 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 1 year ago

    What relay are you using? A picture would help.


    3 years ago

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