Luke Dutton
Published © GPL3+

Holiday Light Show with Raspberry Pi

Be the house in the neighborhood that puts on the light show! Blink your decorative lights to the beat of music and play it on the radio.

Beginner8 hours7,489
Holiday Light Show with Raspberry Pi

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
ELEGOO 8 Channel DC 5V Relay Module with Optocoupler
ELEGOO 8 Channel DC 5V Relay Module with Optocoupler
×1
3' Extension cord
×8
Jumper wires (generic)
Jumper wires (generic)
×1
Surge Protector
×2
2" Service Entrance Cable Connector
×2

Software apps and online services

Raspbian
Raspberry Pi Raspbian

Hand tools and fabrication machines

three inch hole saw

Story

Read more

Schematics

Raspberry Pi to 8-channel relay connection diagram

Code

turnLightsOn.sh

SH
Code to simply turn on the lights for your show
#!/bin/bash

SYNCHRONIZED_LIGHTS_HOME=/home/pi/lightshowpi

python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on 2>&1 &

runLights.sh

SH
Turns on your holiday lights show
#!/bin/bash

SYNCHRONIZED_LIGHTS_HOME=/home/pi/lightshowpi

# Start playing back songs and checking sms message at 6:30pm
/home/pi/lightshowpi/bin/start_music_and_lights >> /home/pi/lightshowpi/logs/music_and_lights.play 2>&1 &

stoplights.sh

SH
stops the show or anything from lightshow pi that is running
SYNCHRONIZED_LIGHTS_HOME=/home/pi/lightshowpi

/home/pi/lightshowpi/bin/stop_music_and_lights >> /home/pi/lightshowpi/logs/music_and_lights.stop 2>&1 &

Credits

Luke Dutton

Luke Dutton

9 projects • 10 followers
I currently have a BAS in Information Technology with a certificate in Software Application Development

Comments