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
https://www.amazon.com/Vilros-Raspberry-Complete-S...
Sainsmart 8 Channel 5V Solid State Relay Module Board
http://www.sainsmart.com/8-channel-5v-solid-state-...
Jumper Wires Male to Female
https://www.amazon.com/Jumper-Wires-Premium-200mm-...
9 Short Power Cords
https://www.amazon.com/Etekcity-Power-Extension-Ca...
16 AWG wire
https://www.amazon.com/gp/product/B00INVEQB2/ref=p...
Christmas Lights
Wire Cutter
Pliers
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
https://www.raspberrypi.org/downloads/raspbian
Write SD Card Image with Win32 Disk Imager
https://www.raspberrypi.org/documentation/installa...
Boot the Raspberry Pi, connect to Internet, and open a Terminal.
Follow the LightShowPi Guide:
http://lightshowpi.org/download-and-install/
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core
# Clone the repository to /home/pi/lightshowpi
cd ~
git clone https://togiles@bitbucket.org/togiles/lightshowpi.git
# Grab the stable branch
cd lightshowpi
git fetch && git checkout stable
cd /home/pi/lightshowpi
sudo ./install.sh
This will take several minutes
Once done type:
sudo reboot
Step 3: Testing the Hardware
After the Raspberry Pi reboots type:
sudo python py/hardware_controller.py --state=flash
or
sudo python py/hardware_controller.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
Pliers
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
Refer to the LightShowPi Guide:
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:
https://plus.google.com/communities/10178959630145...
Also don't forget to check out the website for new stuff!
Step 10:

Participated in the
Amps and Speakers Contest 2016
12 Comments
13 days ago
My Pi 3B plays mp3 via USB when I click on from desktop, but cannot get lightshowpi to do, what am I missing?
-------------------
sysdefault:CARD=USB
Jabra SPEAK 510 USB, USB Audio
Default Audio Device
front:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
Front output / input
surround21:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
Jabra SPEAK 510 USB, USB Audio
Direct sample mixing device
usbstream:CARD=USB
Jabra SPEAK 510 USB
USB Stream Output
Reply 13 days ago
OK, I figured it out!! I modifies /usr/share/alsa/alsa.conf and now I have Sound!! :)
Reply 13 days ago
# tells me that the default Alsa card built into the RPI is
sysdefault:CARD=USB
defaults.cfg
Question 2 years ago
Building my first 16 channel light controller with raspberry pi 3b+ alot of questions first one how do I connect bullet pixel to the outlets on controller
Question 2 years ago
Is there a better diagram for the power cords into the relay? I can't see what is going on in the pics and Google+ is LONG gone.
Thanks.
Question 3 years 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?
Reply 2 years ago
I've uploaded pictures of mine.
Question 2 years ago
Hello! I am trying to recreate this project but the Google+ documentation has been taken down :(. Is there a way to reupload it? I want to modify this project for a party room. Have an LED strip sync with the music being played. Best,
Blake
Reply 2 years ago
I've uploaded pictures of mine.
Question 5 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 5 years ago
What relay are you using? A picture would help.
7 years ago
It looks really cool :) I love holday light shows!