Skip to content

A web interface for controlling the WS2801 led strips via raspberry pi. I modified some of the code from audio-reactive-led-strip to work with the WS2801 LED strip.

Notifications You must be signed in to change notification settings

kevkid/led_strip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

led_strip

Here is an interface for controlling the WS2801 led strips with a raspberry pi. I modified some of the code from audio-reactive-led-strip so that it would work with the WS2801 strips. You can control the leds via the webbrowser.

Image1

I am using several other projects and have made modifications to those projects.

I am using Twitter Bootstrap, jQuery, audio-reactive-led-strip, huebee, and How to connect and control a Raspberry Pi WS2801 RGB LED Strip

Requirements:

  1. Raspberry Pi
  2. WS2801 LED strip
  3. 5V 10A power supply (But I am using a 20A, so that should be fine)
  4. Jumper cables and breadboard
  5. USB microphone

I followed this guide

Install prerequisites:

sudo apt-get update
sudo apt-get install python-pip -y
sudo pip install adafruit-ws2801
sudo pip install flask
sudo apt-get install python-numpy python-scipy python-pyaudio

Audio device configuration -- Taken from: audio-reactive-led-strip

For the Raspberry Pi, a USB audio device needs to be configured as the default audio device.

Create/edit /etc/asound.conf

sudo nano /etc/asound.conf

Set the file to the following text

pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}

Next, set the USB device to as the default device by editing /usr/share/alsa/alsa.conf

sudo nano /usr/share/alsa/alsa.conf:

Change

defaults.ctl.card 0
defaults.pcm.card 0

To

defaults.ctl.card 1
defaults.pcm.card 1

Clone this repo into the led_strip directory

git clone https://github.com/scottlawsonbc/audio-reactive-led-strip.git

Put the led.py and config.py files into audio-reactive-led-strip/python/ replacing the old files.

Now Just run the following:

sudo python3 lights.py

If you are getting bufferoverflow issues follow this

About

A web interface for controlling the WS2801 led strips via raspberry pi. I modified some of the code from audio-reactive-led-strip to work with the WS2801 LED strip.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published