Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip

Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip

Raspberry Pi LED Spectrum Analyzer
Created by Scott Driscoll
Last updated on 2015-01-16 09:30:11 AM EST
2
3
5
5
8
10
12
13
14
Guide Contents
Guide Contents
Introduction and Ingredients
LED strip and RGB LED software
Connecting the RGB LED Strip
RGB Strip Software
Mount the LED Strip
Speed up the RGB Strip Software
Install LightShow Pi
Customize LightShowPi
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 2 of 14
Introduction and Ingredients
A Spectrum Analyzer shows the loudness of different frequency bands (low, mid, high) in
real-time, letting you visualize music. Using a RasPi, RGB LED Strip and some wire, make
yourself a dynamic display and media player. This project is based on some great python
xmas light code from the LightShowPi project, (http://adafru.it/d5n) and advanced users can
even configure it for song voting via SMS!
The project runs in Python, even including the audio processing. It's just able to play and
analyze mp3s in realtime as long as your Pi isn't doing anything else.
Hardware
RasPi -- this guide is built on one running wheezy, Raspbian, ver 3.10.19
15ft (1m) RGB LED strip (http://adafru.it/306), (~160 leds) controllable via SPI, built in
PWM control. This guides shows using one strip wrapped around to form 5 columns,
and writing to different segments of the strip. Only three wires connected to the Pi:
ground, SPI Clock and SPI Data.
10A 5V power supply to drive the LEDs (http://adafru.it/d5o)
Miscellaneous:
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 3 of 14
USB WiFi adapter (http://adafru.it/814) (RTL8188CUS chipset drivers are built in to
wheezy OS!) if you don't want to use Ethernet. I used these
instructions (http://adafru.it/aUB) to get it working.
SD card 4GB or larger (http://adafru.it/102)
USB Power speakers (http://adafru.it/d5p)
Powered USB Hub to plug in keyboard, mouse, wifi,
Some cell phone charger to power the Pi via it's USB power connector
USB keyboard, mouse, HDMI monitor
wire, some female to female jumpers or some JST
connectors (http://adafru.it/578) if you don't want to solder to the RGB strip.
Software:
This project is mostly based on the Pi-based xmas lights controller
code (http://adafru.it/d5n) from Chris Usey,Todd Giles and Ryan Jennings. It's a full
command center for orchestrating xmas lights to audio (wav, mp3, etc). Their code
and hardware lets you setup playlists and turn on and off 120VAC power based on
frequency bands. You can even vote on songs through SMS messages! We're going
to control an RGB strip instead of output pins on the Pi. Grab the attached
synchronized_lights_LED_strip.py (http://adafru.it/d5q) file.
Python control of LPD8806 RGB LED strip (http://adafru.it/d5r) via SPI.
This isn't specific to this project, but I used the Geany (http://adafru.it/d5s) IDE for
coding right on the Pi.
If you have any questions, you can use the feedback link on the left or contact me through
my google + page: plus.google.com/+ScottDriscoll (http://adafru.it/d5t) or try the
LightShowPi community (http://adafru.it/d5n)
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 4 of 14
LED strip and RGB LED software
Here's an overview picture showing all the major components. Go ahead and plug in your
powered USB hub, mouse, keyboard, speakers, and either ethernet or WiFi connection.
Connecting the RGB LED Strip
First, cut back the plastic sleeve from the RGB strip and solder 4 wires. Note that there's an
Input and Output end of the strip, and it's important to connect to the input end. You can also
use some JST connectors if you don't want to solder.
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 5 of 14
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 6 of 14
Now connect the wires to the Raspberry Pi and 5V Power supply as shown. Don't forget to
connect the ground of the power supply to the ground of the Pi! A much more detailed
guide (http://adafru.it/d5v) to creating this connection can be found in the light painting
project. The picture below is from that guide.
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 7 of 14
RGB Strip Software
Grab the software (http://adafru.it/d5r) and follow the instructions on that page for getting
the Pi able to output to SPI. Do install spidev. It's important that you use the hardware SPI
because any bit-banging approach won't be fast enough.
sudo raspi-config to enable hardware SPI (follow instructions at git page). While you're
there, set the audio output to be out the 3.5mm jack rather than the HDMI connector.
I added the install directory to my PYTHONPATH in bashrc so I could call the functions from
anywhere.
nano ~/.bashrc:
export PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806
(you could also add PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806 to
/etc/environments, but this will require a reboot to register on new terminal windows)
Test out that the strip works by running the example code:
python example.py
The xmas light code we're going to download later wants to run as root, and when you run
things with a sudo in front, the environment variables, specifically, PYTHONPATH aren't
transferred.
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 8 of 14
To keep those environment variables around, edit /etc/sudoers by typing
sudo visudo
and then add to the bottom
Defaults env_keep=SYNCHRONIZED_LIGHTS_HOME
Defaults env_keep+=PYTHONPATH
the first line is something we'll need for the xmas light package to be installed later.
To test that you have it setup right and can run things as root, close the terminal and re-
open, then type
sudo python
from bootstrap import *
led.fill(Color(50,50,50),0,10)
led.update()
that should turn on the first 10 LEDs. You might need to restart a terminal window to make
sure the environment variables get loaded.
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 9 of 14
Mount the LED Strip
I looped my strip back and forth on a baby gate with twist ties, but this wastes LEDs at the
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 10 of 14
bends. A cleaner route would be to cut the strip into 5 even segments and solder 4-wire
jumpers between each segment. You'll just need to adjust the address of the LEDs for the
columns.
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 11 of 14
Speed up the RGB Strip Software
The RGB python code is a bit slow at the time of this writing, but a few tweaks can
dramatically speed it up.
First edit ledstrip.py to use the hardware SPI, note the argument use_py_spi = True.
My ledstrip.py was located at /home/pi/RPi-LPD8806/raspledstrip/ledstrip.py
Now inside LPD8806.py, we're going to change the SPI speed to 16MHz.
That print statement is there just to make sure everything gets set correctly.
One final change to the LPD8806.py file is in the update() function. Every call to
self.spi.xfer2() seems to have a 160ms delay at the end, so we're simply going to change
the update function so that it calls the spi.xfer2() fewer times.
If you re-run the example.py python file, you should see a substantial increase in speed.
def __init__(self, leds, use_py_spi = True, dev="/dev/spidev0.0", driver="LPD8806"):
if self.use_py_spi:
import spidev
self.spi = spidev.SpiDev()
self.spi.open(0,0)
self.spi.max_speed_hz = 16000000
print 'py-spidev MHz: %d' % (self.spi.max_speed_hz / 1000000.0 )
def update(self, buffer):
temp_buffer = []
if self.use_py_spi:
for x in range(self.leds):
temp_buffer = temp_buffer + [i for i in buffer[x]]
#self.spi.xfer2([i for i in buffer[x]])
self.spi.xfer2(temp_buffer)
self.spi.xfer2([0x00,0x00,0x00]) #zero fill the last to prevent stray colors at the end
self.spi.xfer2([0x00]) #once more with feeling - this helps :) time2 = time.time()
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 12 of 14
Install LightShow Pi
Now that we've got writing to the LED strip fast, and accessible from python running as root
from anywhere, it's time to install the fantastic xmas light orchestration
software (http://adafru.it/d5n), and update it to control the LED strip.
Once you download the code (http://adafru.it/d5w) from bitbucket, follow the instructions to
get it installed. I recommend installing to /home/pi/lightshowpi to avoid some installation
issues. You can also change the INSTALL_DIR inside install.sh if you wish.
Before running sudo ./install.sh, you should edit the file and change the INSTALL_DIR. Then
run:
sudo ./install.sh
The end of the bash script sets up some environment variables in /etc/environment, but I
also added it to my .bashrc at the end like so:
export SYNCHRONIZED_LIGHTS_HOME="/home/pi/lightshowpi"
export PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806-master
that second line is for the LEDs. Make sure sudoers also has this line so that the environment
variable sticks around when you run things as sudo. This should already be there from a
previous step.
Defaults env_keep=SYNCHRONIZED_LIGHTS_HOME
As a first step, try to run a song and see if the code throws any errors:
sudo py/synchronized_lights.py --file /home/pi/some_random_music_file.mp3
Don't hear any sound? I had to change my audio out from the default HDMI to the onboard
1/8" jack:
amixer cset numid=3 1
I also had to turn up the volume
amixer set PCM 1
© Adafruit
Industries
https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on-
rgb-led-strip
Page 13 of 14
Customize LightShowPi
Our final step is to customize LightShowPi's config file, and run a special script that outputs
to our RGB LED strip instead of turning GPIO pins on and off.
go into the lightshowpi/config directory, and copy of defaults.cfg to overrides.cfg.
Open overrides.cfg and make the following changes:
gpio_pins = 7,0,1,2,3 # it doesn't matter what the numbers are, only that there are 5 for
our 5 LED columns
preshow = on:0,off:0 # no need to delay the start of the show!
min_frequency = 50 # this is just preference since my speakers don't play much sound
below 50Hz. You can specify the exact frequency ranges you want, too.
_____________________________
Now, if you haven't already downloaded the code, grab the
synchronized_lights_LED_strip.py (http://adafru.it/d5q) file and put it in the same directory
with the original syncrhonized_lights.py file. This file writes out to our LED strip instead of the
GPIO pins in the default script.
You might need to make the file executable before running it:
chmod +x synchronized_lights_LED_strip.py
Try running with the new script:
sudo py/synchronized_lights_LED_strip.py --file
/home/pi/lightshowpi/music/some_song.mp3
And that's it! Hopefully you hear and see music!
Depending on your strip, you might need to make changes to the display_column() function
to adjust for what number LEDs make up your columns.
For some more details on how the code works and changed made to the original script,
checkout the longer instructable (http://adafru.it/d5x) I originally wrote.
If you have any questions, you can use the feedback link on the left or contact me through
my google + page: plus.google.com/+ScottDriscoll (http://adafru.it/d5t) or try the
LightShowPi community (http://adafru.it/d5y)
© Adafruit Industries Last Updated: 2015-01-16 09:30:12 AM EST Page 14 of 14

Recomendados

Raspberry Pi Using Python por
Raspberry Pi Using PythonRaspberry Pi Using Python
Raspberry Pi Using PythonSeggy Segaran
9.4K visualizações13 slides
Introduction To Raspberry Pi with Simple GPIO pin Control por
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlPradip Bhandari
3K visualizações40 slides
Raspberry Pi and Amateur Radio por
Raspberry Pi and Amateur RadioRaspberry Pi and Amateur Radio
Raspberry Pi and Amateur RadioKevin Hooke
16.1K visualizações31 slides
Raspberry pi glossary of terms dictionary extended por
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedWiseNaeem
39 visualizações15 slides
Feature satip4 por
Feature satip4Feature satip4
Feature satip4TELE-satellite man
398 visualizações6 slides
Feature satip4 por
Feature satip4Feature satip4
Feature satip4TELE-satellite bul
212 visualizações6 slides

Mais conteúdo relacionado

Mais procurados

Raspberry pi tutorial por
Raspberry pi tutorialRaspberry pi tutorial
Raspberry pi tutorialImad Rhali
139 visualizações3 slides
pcDuino tech talk at Carnegie Mellon University 10/14/2014 por
pcDuino tech talk at Carnegie Mellon University 10/14/2014pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014Jingfeng Liu
1.8K visualizações76 slides
Feature satip4 por
Feature satip4Feature satip4
Feature satip4TELE-audiovision eng
374 visualizações6 slides
Raspberry pi Board Hardware & Software Setup por
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software SetupRANAALIMAJEEDRAJPUT
93 visualizações8 slides
Feature satip4 por
Feature satip4Feature satip4
Feature satip4TELE-satellite ned
310 visualizações6 slides
Scratch pcduino por
Scratch pcduinoScratch pcduino
Scratch pcduinoJingfeng Liu
1.5K visualizações55 slides

Mais procurados(18)

Raspberry pi tutorial por Imad Rhali
Raspberry pi tutorialRaspberry pi tutorial
Raspberry pi tutorial
Imad Rhali139 visualizações
pcDuino tech talk at Carnegie Mellon University 10/14/2014 por Jingfeng Liu
pcDuino tech talk at Carnegie Mellon University 10/14/2014pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014
Jingfeng Liu1.8K visualizações
Raspberry pi Board Hardware & Software Setup por RANAALIMAJEEDRAJPUT
Raspberry pi Board Hardware & Software SetupRaspberry pi Board Hardware & Software Setup
Raspberry pi Board Hardware & Software Setup
RANAALIMAJEEDRAJPUT93 visualizações
Scratch pcduino por Jingfeng Liu
Scratch pcduinoScratch pcduino
Scratch pcduino
Jingfeng Liu1.5K visualizações
IPv6: A Digital Game Changer por CARLOS RALLI-UCENDO
IPv6: A Digital Game ChangerIPv6: A Digital Game Changer
IPv6: A Digital Game Changer
CARLOS RALLI-UCENDO1.7K visualizações
Building the Internet of Things with Raspberry Pi por Neil Broers
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
Neil Broers4.9K visualizações
Interacting with Intel Edison por FITC
Interacting with Intel EdisonInteracting with Intel Edison
Interacting with Intel Edison
FITC2.9K visualizações
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi por Tomomi Imura
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi [Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
Tomomi Imura466 visualizações
Iaetsd the universal brain for all robots por Iaetsd Iaetsd
Iaetsd the universal brain for all robotsIaetsd the universal brain for all robots
Iaetsd the universal brain for all robots
Iaetsd Iaetsd501 visualizações
Exploring Raspberry Pi por Lentin Joseph
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry Pi
Lentin Joseph15.5K visualizações
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is por Satya Harish
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_isUplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
UplinQ - enhance qualcomm® snapdragon™ audio using android audio ap_is
Satya Harish737 visualizações
Raspberry Pi 3 Tutorial | Raspberry Pi 3 Projects | IoT Projects | IoT Tutori... por Edureka!
Raspberry Pi 3 Tutorial | Raspberry Pi 3 Projects | IoT Projects | IoT Tutori...Raspberry Pi 3 Tutorial | Raspberry Pi 3 Projects | IoT Projects | IoT Tutori...
Raspberry Pi 3 Tutorial | Raspberry Pi 3 Projects | IoT Projects | IoT Tutori...
Edureka!400 visualizações
pcDuino Presentation at SparkFun por Jingfeng Liu
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
Jingfeng Liu2.4K visualizações
Introduction to pcDuino por Jingfeng Liu
Introduction to pcDuinoIntroduction to pcDuino
Introduction to pcDuino
Jingfeng Liu8.5K visualizações
DigiPinguïns: demo Raspberry Pi (Koen De Smet) por Avansa Mid- en Zuidwest
DigiPinguïns: demo Raspberry Pi (Koen De Smet)DigiPinguïns: demo Raspberry Pi (Koen De Smet)
DigiPinguïns: demo Raspberry Pi (Koen De Smet)
Avansa Mid- en Zuidwest651 visualizações
Parallel Rendering of Webpages por Langtech
Parallel Rendering of WebpagesParallel Rendering of Webpages
Parallel Rendering of Webpages
Langtech746 visualizações

Destaque

Three weeks after deployment por
Three weeks after deploymentThree weeks after deployment
Three weeks after deploymentDoris Herrmann
182 visualizações12 slides
Post-Aquinas Options Eve 2012 -Skills solutions:Apprenticeships por
Post-Aquinas Options Eve 2012 -Skills solutions:ApprenticeshipsPost-Aquinas Options Eve 2012 -Skills solutions:Apprenticeships
Post-Aquinas Options Eve 2012 -Skills solutions:ApprenticeshipsAquinas College
454 visualizações11 slides
Meeting the Needs of Disadvantaged Students by Ikhlas Ahmad por
Meeting the Needs of Disadvantaged Students by Ikhlas AhmadMeeting the Needs of Disadvantaged Students by Ikhlas Ahmad
Meeting the Needs of Disadvantaged Students by Ikhlas AhmadIkhlas Ahmad
253 visualizações18 slides
lớp học MMI hotline 0948 11 44 71 por
lớp học MMI hotline 0948 11 44 71lớp học MMI hotline 0948 11 44 71
lớp học MMI hotline 0948 11 44 71Ngọc Huy Phạm
334 visualizações10 slides
Tizen.Net with Xamarin por
Tizen.Net with XamarinTizen.Net with Xamarin
Tizen.Net with XamarinCheah Eng Soon
348 visualizações10 slides
Elena Givone presents: Creation and design, an approach to creative process por
Elena Givone presents: Creation and design, an approach to creative processElena Givone presents: Creation and design, an approach to creative process
Elena Givone presents: Creation and design, an approach to creative processManfrotto
1K visualizações119 slides

Destaque(16)

Three weeks after deployment por Doris Herrmann
Three weeks after deploymentThree weeks after deployment
Three weeks after deployment
Doris Herrmann182 visualizações
Post-Aquinas Options Eve 2012 -Skills solutions:Apprenticeships por Aquinas College
Post-Aquinas Options Eve 2012 -Skills solutions:ApprenticeshipsPost-Aquinas Options Eve 2012 -Skills solutions:Apprenticeships
Post-Aquinas Options Eve 2012 -Skills solutions:Apprenticeships
Aquinas College454 visualizações
Meeting the Needs of Disadvantaged Students by Ikhlas Ahmad por Ikhlas Ahmad
Meeting the Needs of Disadvantaged Students by Ikhlas AhmadMeeting the Needs of Disadvantaged Students by Ikhlas Ahmad
Meeting the Needs of Disadvantaged Students by Ikhlas Ahmad
Ikhlas Ahmad253 visualizações
lớp học MMI hotline 0948 11 44 71 por Ngọc Huy Phạm
lớp học MMI hotline 0948 11 44 71lớp học MMI hotline 0948 11 44 71
lớp học MMI hotline 0948 11 44 71
Ngọc Huy Phạm334 visualizações
Tizen.Net with Xamarin por Cheah Eng Soon
Tizen.Net with XamarinTizen.Net with Xamarin
Tizen.Net with Xamarin
Cheah Eng Soon348 visualizações
Elena Givone presents: Creation and design, an approach to creative process por Manfrotto
Elena Givone presents: Creation and design, an approach to creative processElena Givone presents: Creation and design, an approach to creative process
Elena Givone presents: Creation and design, an approach to creative process
Manfrotto1K visualizações
Turn Key Group Services - OHS Toolkit por turnkeygroupservices
Turn Key Group Services - OHS ToolkitTurn Key Group Services - OHS Toolkit
Turn Key Group Services - OHS Toolkit
turnkeygroupservices1.1K visualizações
2012 Delivery Maxx Overview por craigrodenmayer
2012 Delivery Maxx Overview2012 Delivery Maxx Overview
2012 Delivery Maxx Overview
craigrodenmayer166 visualizações
anthony duarte por anthonyD16
anthony duarteanthony duarte
anthony duarte
anthonyD16564 visualizações
Starbucks' Corporate Responsibility por Tricho
Starbucks' Corporate ResponsibilityStarbucks' Corporate Responsibility
Starbucks' Corporate Responsibility
Tricho703 visualizações
Trakya universitesi-kurslari por zeynep_zyn85
Trakya universitesi-kurslariTrakya universitesi-kurslari
Trakya universitesi-kurslari
zeynep_zyn85225 visualizações
How to teach people to get a job, brainstorming por Alfredo Zayas
How to teach people to get a job, brainstormingHow to teach people to get a job, brainstorming
How to teach people to get a job, brainstorming
Alfredo Zayas234 visualizações
Thomas Swendiman Sample Portfolio por tswendiman
Thomas Swendiman Sample PortfolioThomas Swendiman Sample Portfolio
Thomas Swendiman Sample Portfolio
tswendiman129 visualizações
4 building benchstrength for the future por mikegggg
4 building benchstrength for the future4 building benchstrength for the future
4 building benchstrength for the future
mikegggg281 visualizações
Stopping by the woods on a snowy evening(World Literature) por Sarah Cruz
Stopping by the woods on a snowy evening(World Literature)Stopping by the woods on a snowy evening(World Literature)
Stopping by the woods on a snowy evening(World Literature)
Sarah Cruz1.5K visualizações
Fiberoptic11 por GARMA ELECTRONICA
Fiberoptic11Fiberoptic11
Fiberoptic11
GARMA ELECTRONICA227 visualizações

Similar a Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip

Bulb Control using Web App with Raspberry Pi por
Bulb Control using Web App with Raspberry Pi Bulb Control using Web App with Raspberry Pi
Bulb Control using Web App with Raspberry Pi Sanjay Kumar
186 visualizações13 slides
Tac Presentation October 72014- Raspberry PI por
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
1.1K visualizações30 slides
Raspberry Pi Free Session - 20_09_2014 por
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014Mandeesh Singh
1.7K visualizações36 slides
Raspberry Pi Session - 22_11_2014 por
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Mandeesh Singh
987 visualizações35 slides
Johnny-Five por
Johnny-FiveJohnny-Five
Johnny-FiveHenri Cavalcante
379 visualizações16 slides
Raspberry-Pi por
Raspberry-PiRaspberry-Pi
Raspberry-PiRehan Fazal
5.7K visualizações56 slides

Similar a Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip(20)

Bulb Control using Web App with Raspberry Pi por Sanjay Kumar
Bulb Control using Web App with Raspberry Pi Bulb Control using Web App with Raspberry Pi
Bulb Control using Web App with Raspberry Pi
Sanjay Kumar186 visualizações
Tac Presentation October 72014- Raspberry PI por Cliff Samuels Jr.
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
Cliff Samuels Jr.1.1K visualizações
Raspberry Pi Free Session - 20_09_2014 por Mandeesh Singh
Raspberry Pi Free Session - 20_09_2014Raspberry Pi Free Session - 20_09_2014
Raspberry Pi Free Session - 20_09_2014
Mandeesh Singh1.7K visualizações
Raspberry Pi Session - 22_11_2014 por Mandeesh Singh
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
Mandeesh Singh987 visualizações
Johnny-Five por Henri Cavalcante
Johnny-FiveJohnny-Five
Johnny-Five
Henri Cavalcante379 visualizações
Raspberry-Pi por Rehan Fazal
Raspberry-PiRaspberry-Pi
Raspberry-Pi
Rehan Fazal5.7K visualizações
Attendance system using MYSQL with Raspberry pi and RFID-RC522 por Sanjay Kumar
Attendance system using MYSQL with Raspberry pi and RFID-RC522Attendance system using MYSQL with Raspberry pi and RFID-RC522
Attendance system using MYSQL with Raspberry pi and RFID-RC522
Sanjay Kumar3.1K visualizações
Raspberry pi por VipulKumar300
Raspberry piRaspberry pi
Raspberry pi
VipulKumar300104 visualizações
Node-RED and getting started on the Internet of Things por Boris Adryan
Node-RED and getting started on the Internet of ThingsNode-RED and getting started on the Internet of Things
Node-RED and getting started on the Internet of Things
Boris Adryan6.3K visualizações
Controlling the internet of things using wearable tech - Design+Code Day; Ara... por ArabNet ME
Controlling the internet of things using wearable tech - Design+Code Day; Ara...Controlling the internet of things using wearable tech - Design+Code Day; Ara...
Controlling the internet of things using wearable tech - Design+Code Day; Ara...
ArabNet ME705 visualizações
Using raspberry pi to sense temperature and relative humidity por IRJET Journal
Using raspberry pi to sense temperature and relative humidityUsing raspberry pi to sense temperature and relative humidity
Using raspberry pi to sense temperature and relative humidity
IRJET Journal116 visualizações
Java Device I/O at Raspberry PI to Build a Candy Vending Machine por Jeff Prestes
Java Device I/O at Raspberry PI to Build a Candy Vending MachineJava Device I/O at Raspberry PI to Build a Candy Vending Machine
Java Device I/O at Raspberry PI to Build a Candy Vending Machine
Jeff Prestes4.7K visualizações
Raspberry pi technical documentation por GR Techno Solutions
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentation
GR Techno Solutions1.1K visualizações
Raspberry Pi Introductory Lecture por Syed Umaid Ahmed
Raspberry Pi Introductory LectureRaspberry Pi Introductory Lecture
Raspberry Pi Introductory Lecture
Syed Umaid Ahmed87 visualizações
Building your own RC Car with Raspberry Pi por Jeff Prestes
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry Pi
Jeff Prestes10.2K visualizações
Raspi_TOR_Access_Point_BenMoore por Benjamin Moore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMoore
Benjamin Moore220 visualizações
Near Field Communication on Raspberry Pi por IRJET Journal
Near Field Communication on Raspberry PiNear Field Communication on Raspberry Pi
Near Field Communication on Raspberry Pi
IRJET Journal70 visualizações
Raspberry pi por Naga Srinivas
Raspberry pi Raspberry pi
Raspberry pi
Naga Srinivas544 visualizações
Rassberry pi por Junaid Raja
Rassberry piRassberry pi
Rassberry pi
Junaid Raja544 visualizações

Mais de Stefan Oprea

Training-Book-Samsung.ppt por
Training-Book-Samsung.pptTraining-Book-Samsung.ppt
Training-Book-Samsung.pptStefan Oprea
15 visualizações115 slides
PRESENTATION ON TOUCH TECHNOLOGY.ppt por
PRESENTATION ON TOUCH TECHNOLOGY.pptPRESENTATION ON TOUCH TECHNOLOGY.ppt
PRESENTATION ON TOUCH TECHNOLOGY.pptStefan Oprea
11 visualizações20 slides
Web technologies-course 12.pptx por
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptxStefan Oprea
3 visualizações84 slides
Web technologies-course 11.pptx por
Web technologies-course 11.pptxWeb technologies-course 11.pptx
Web technologies-course 11.pptxStefan Oprea
4 visualizações82 slides
Web technologies-course 10.pptx por
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptxStefan Oprea
6 visualizações69 slides
Web technologies-course 09.pptx por
Web technologies-course 09.pptxWeb technologies-course 09.pptx
Web technologies-course 09.pptxStefan Oprea
3 visualizações92 slides

Mais de Stefan Oprea(20)

Training-Book-Samsung.ppt por Stefan Oprea
Training-Book-Samsung.pptTraining-Book-Samsung.ppt
Training-Book-Samsung.ppt
Stefan Oprea15 visualizações
PRESENTATION ON TOUCH TECHNOLOGY.ppt por Stefan Oprea
PRESENTATION ON TOUCH TECHNOLOGY.pptPRESENTATION ON TOUCH TECHNOLOGY.ppt
PRESENTATION ON TOUCH TECHNOLOGY.ppt
Stefan Oprea11 visualizações
Web technologies-course 12.pptx por Stefan Oprea
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptx
Stefan Oprea3 visualizações
Web technologies-course 11.pptx por Stefan Oprea
Web technologies-course 11.pptxWeb technologies-course 11.pptx
Web technologies-course 11.pptx
Stefan Oprea4 visualizações
Web technologies-course 10.pptx por Stefan Oprea
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptx
Stefan Oprea6 visualizações
Web technologies-course 09.pptx por Stefan Oprea
Web technologies-course 09.pptxWeb technologies-course 09.pptx
Web technologies-course 09.pptx
Stefan Oprea3 visualizações
Web technologies-course 08.pptx por Stefan Oprea
Web technologies-course 08.pptxWeb technologies-course 08.pptx
Web technologies-course 08.pptx
Stefan Oprea4 visualizações
Web technologies-course 07.pptx por Stefan Oprea
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
Stefan Oprea74 visualizações
Web technologies-course 06.pptx por Stefan Oprea
Web technologies-course 06.pptxWeb technologies-course 06.pptx
Web technologies-course 06.pptx
Stefan Oprea4 visualizações
Web technologies-course 05.pptx por Stefan Oprea
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
Stefan Oprea2 visualizações
Web technologies-course 04.pptx por Stefan Oprea
Web technologies-course 04.pptxWeb technologies-course 04.pptx
Web technologies-course 04.pptx
Stefan Oprea4 visualizações
Web technologies-course 03.pptx por Stefan Oprea
Web technologies-course 03.pptxWeb technologies-course 03.pptx
Web technologies-course 03.pptx
Stefan Oprea2 visualizações
Web technologies-course 02.pptx por Stefan Oprea
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptx
Stefan Oprea9 visualizações
Web technologies-course 01.pptx por Stefan Oprea
Web technologies-course 01.pptxWeb technologies-course 01.pptx
Web technologies-course 01.pptx
Stefan Oprea2 visualizações
Fundamentals of Digital Modulation.ppt por Stefan Oprea
Fundamentals of Digital Modulation.pptFundamentals of Digital Modulation.ppt
Fundamentals of Digital Modulation.ppt
Stefan Oprea12 visualizações
Orthogonal Frequency Division Multiplexing.ppt por Stefan Oprea
Orthogonal Frequency Division Multiplexing.pptOrthogonal Frequency Division Multiplexing.ppt
Orthogonal Frequency Division Multiplexing.ppt
Stefan Oprea37 visualizações
Modulation tutorial.ppt por Stefan Oprea
Modulation tutorial.pptModulation tutorial.ppt
Modulation tutorial.ppt
Stefan Oprea3 visualizações
Comparison of Single Carrier and Multi-carrier.ppt por Stefan Oprea
Comparison of Single Carrier and Multi-carrier.pptComparison of Single Carrier and Multi-carrier.ppt
Comparison of Single Carrier and Multi-carrier.ppt
Stefan Oprea40 visualizações
OFDM and MC-CDMA An Implementation using MATLAB.ppt por Stefan Oprea
OFDM and MC-CDMA An Implementation using MATLAB.pptOFDM and MC-CDMA An Implementation using MATLAB.ppt
OFDM and MC-CDMA An Implementation using MATLAB.ppt
Stefan Oprea36 visualizações
Concepts of 3GPP LTE.ppt por Stefan Oprea
Concepts of 3GPP LTE.pptConcepts of 3GPP LTE.ppt
Concepts of 3GPP LTE.ppt
Stefan Oprea60 visualizações

Último

Investor Presentation por
Investor PresentationInvestor Presentation
Investor Presentationeser sevinç
20 visualizações26 slides
cloud computing-virtualization.pptx por
cloud computing-virtualization.pptxcloud computing-virtualization.pptx
cloud computing-virtualization.pptxRajaulKarim20
85 visualizações31 slides
SWM L1-L14_drhasan (Part 1).pdf por
SWM L1-L14_drhasan (Part 1).pdfSWM L1-L14_drhasan (Part 1).pdf
SWM L1-L14_drhasan (Part 1).pdfMahmudHasan747870
48 visualizações150 slides
Codes and Conventions.pptx por
Codes and Conventions.pptxCodes and Conventions.pptx
Codes and Conventions.pptxIsabellaGraceAnkers
7 visualizações5 slides
CHEMICAL KINETICS.pdf por
CHEMICAL KINETICS.pdfCHEMICAL KINETICS.pdf
CHEMICAL KINETICS.pdfAguedaGutirrez
8 visualizações337 slides
fakenews_DBDA_Mar23.pptx por
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptxdeepmitra8
12 visualizações34 slides

Último(20)

Investor Presentation por eser sevinç
Investor PresentationInvestor Presentation
Investor Presentation
eser sevinç20 visualizações
cloud computing-virtualization.pptx por RajaulKarim20
cloud computing-virtualization.pptxcloud computing-virtualization.pptx
cloud computing-virtualization.pptx
RajaulKarim2085 visualizações
SWM L1-L14_drhasan (Part 1).pdf por MahmudHasan747870
SWM L1-L14_drhasan (Part 1).pdfSWM L1-L14_drhasan (Part 1).pdf
SWM L1-L14_drhasan (Part 1).pdf
MahmudHasan74787048 visualizações
Codes and Conventions.pptx por IsabellaGraceAnkers
Codes and Conventions.pptxCodes and Conventions.pptx
Codes and Conventions.pptx
IsabellaGraceAnkers7 visualizações
CHEMICAL KINETICS.pdf por AguedaGutirrez
CHEMICAL KINETICS.pdfCHEMICAL KINETICS.pdf
CHEMICAL KINETICS.pdf
AguedaGutirrez8 visualizações
fakenews_DBDA_Mar23.pptx por deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra812 visualizações
CHI-SQUARE ( χ2) TESTS.pptx por ssusera597c5
CHI-SQUARE ( χ2) TESTS.pptxCHI-SQUARE ( χ2) TESTS.pptx
CHI-SQUARE ( χ2) TESTS.pptx
ssusera597c529 visualizações
MSA Website Slideshow (16).pdf por msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla46 visualizações
An approach of ontology and knowledge base for railway maintenance por IJECEIAES
An approach of ontology and knowledge base for railway maintenanceAn approach of ontology and knowledge base for railway maintenance
An approach of ontology and knowledge base for railway maintenance
IJECEIAES12 visualizações
A multi-microcontroller-based hardware for deploying Tiny machine learning mo... por IJECEIAES
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
A multi-microcontroller-based hardware for deploying Tiny machine learning mo...
IJECEIAES12 visualizações
NEW SUPPLIERS SUPPLIES (copie).pdf por georgesradjou
NEW SUPPLIERS SUPPLIES (copie).pdfNEW SUPPLIERS SUPPLIES (copie).pdf
NEW SUPPLIERS SUPPLIES (copie).pdf
georgesradjou14 visualizações
9_DVD_Dynamic_logic_circuits.pdf por Usha Mehta
9_DVD_Dynamic_logic_circuits.pdf9_DVD_Dynamic_logic_circuits.pdf
9_DVD_Dynamic_logic_circuits.pdf
Usha Mehta28 visualizações
Update 42 models(Diode/General ) in SPICE PARK(DEC2023) por Tsuyoshi Horigome
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Tsuyoshi Horigome19 visualizações

Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip

  • 1. Raspberry Pi LED Spectrum Analyzer Created by Scott Driscoll Last updated on 2015-01-16 09:30:11 AM EST
  • 2. 2 3 5 5 8 10 12 13 14 Guide Contents Guide Contents Introduction and Ingredients LED strip and RGB LED software Connecting the RGB LED Strip RGB Strip Software Mount the LED Strip Speed up the RGB Strip Software Install LightShow Pi Customize LightShowPi © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 2 of 14
  • 3. Introduction and Ingredients A Spectrum Analyzer shows the loudness of different frequency bands (low, mid, high) in real-time, letting you visualize music. Using a RasPi, RGB LED Strip and some wire, make yourself a dynamic display and media player. This project is based on some great python xmas light code from the LightShowPi project, (http://adafru.it/d5n) and advanced users can even configure it for song voting via SMS! The project runs in Python, even including the audio processing. It's just able to play and analyze mp3s in realtime as long as your Pi isn't doing anything else. Hardware RasPi -- this guide is built on one running wheezy, Raspbian, ver 3.10.19 15ft (1m) RGB LED strip (http://adafru.it/306), (~160 leds) controllable via SPI, built in PWM control. This guides shows using one strip wrapped around to form 5 columns, and writing to different segments of the strip. Only three wires connected to the Pi: ground, SPI Clock and SPI Data. 10A 5V power supply to drive the LEDs (http://adafru.it/d5o) Miscellaneous: © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 3 of 14
  • 4. USB WiFi adapter (http://adafru.it/814) (RTL8188CUS chipset drivers are built in to wheezy OS!) if you don't want to use Ethernet. I used these instructions (http://adafru.it/aUB) to get it working. SD card 4GB or larger (http://adafru.it/102) USB Power speakers (http://adafru.it/d5p) Powered USB Hub to plug in keyboard, mouse, wifi, Some cell phone charger to power the Pi via it's USB power connector USB keyboard, mouse, HDMI monitor wire, some female to female jumpers or some JST connectors (http://adafru.it/578) if you don't want to solder to the RGB strip. Software: This project is mostly based on the Pi-based xmas lights controller code (http://adafru.it/d5n) from Chris Usey,Todd Giles and Ryan Jennings. It's a full command center for orchestrating xmas lights to audio (wav, mp3, etc). Their code and hardware lets you setup playlists and turn on and off 120VAC power based on frequency bands. You can even vote on songs through SMS messages! We're going to control an RGB strip instead of output pins on the Pi. Grab the attached synchronized_lights_LED_strip.py (http://adafru.it/d5q) file. Python control of LPD8806 RGB LED strip (http://adafru.it/d5r) via SPI. This isn't specific to this project, but I used the Geany (http://adafru.it/d5s) IDE for coding right on the Pi. If you have any questions, you can use the feedback link on the left or contact me through my google + page: plus.google.com/+ScottDriscoll (http://adafru.it/d5t) or try the LightShowPi community (http://adafru.it/d5n) © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 4 of 14
  • 5. LED strip and RGB LED software Here's an overview picture showing all the major components. Go ahead and plug in your powered USB hub, mouse, keyboard, speakers, and either ethernet or WiFi connection. Connecting the RGB LED Strip First, cut back the plastic sleeve from the RGB strip and solder 4 wires. Note that there's an Input and Output end of the strip, and it's important to connect to the input end. You can also use some JST connectors if you don't want to solder. © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 5 of 14
  • 7. Now connect the wires to the Raspberry Pi and 5V Power supply as shown. Don't forget to connect the ground of the power supply to the ground of the Pi! A much more detailed guide (http://adafru.it/d5v) to creating this connection can be found in the light painting project. The picture below is from that guide. © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 7 of 14
  • 8. RGB Strip Software Grab the software (http://adafru.it/d5r) and follow the instructions on that page for getting the Pi able to output to SPI. Do install spidev. It's important that you use the hardware SPI because any bit-banging approach won't be fast enough. sudo raspi-config to enable hardware SPI (follow instructions at git page). While you're there, set the audio output to be out the 3.5mm jack rather than the HDMI connector. I added the install directory to my PYTHONPATH in bashrc so I could call the functions from anywhere. nano ~/.bashrc: export PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806 (you could also add PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806 to /etc/environments, but this will require a reboot to register on new terminal windows) Test out that the strip works by running the example code: python example.py The xmas light code we're going to download later wants to run as root, and when you run things with a sudo in front, the environment variables, specifically, PYTHONPATH aren't transferred. © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 8 of 14
  • 9. To keep those environment variables around, edit /etc/sudoers by typing sudo visudo and then add to the bottom Defaults env_keep=SYNCHRONIZED_LIGHTS_HOME Defaults env_keep+=PYTHONPATH the first line is something we'll need for the xmas light package to be installed later. To test that you have it setup right and can run things as root, close the terminal and re- open, then type sudo python from bootstrap import * led.fill(Color(50,50,50),0,10) led.update() that should turn on the first 10 LEDs. You might need to restart a terminal window to make sure the environment variables get loaded. © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 9 of 14
  • 10. Mount the LED Strip I looped my strip back and forth on a baby gate with twist ties, but this wastes LEDs at the © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 10 of 14
  • 11. bends. A cleaner route would be to cut the strip into 5 even segments and solder 4-wire jumpers between each segment. You'll just need to adjust the address of the LEDs for the columns. © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 11 of 14
  • 12. Speed up the RGB Strip Software The RGB python code is a bit slow at the time of this writing, but a few tweaks can dramatically speed it up. First edit ledstrip.py to use the hardware SPI, note the argument use_py_spi = True. My ledstrip.py was located at /home/pi/RPi-LPD8806/raspledstrip/ledstrip.py Now inside LPD8806.py, we're going to change the SPI speed to 16MHz. That print statement is there just to make sure everything gets set correctly. One final change to the LPD8806.py file is in the update() function. Every call to self.spi.xfer2() seems to have a 160ms delay at the end, so we're simply going to change the update function so that it calls the spi.xfer2() fewer times. If you re-run the example.py python file, you should see a substantial increase in speed. def __init__(self, leds, use_py_spi = True, dev="/dev/spidev0.0", driver="LPD8806"): if self.use_py_spi: import spidev self.spi = spidev.SpiDev() self.spi.open(0,0) self.spi.max_speed_hz = 16000000 print 'py-spidev MHz: %d' % (self.spi.max_speed_hz / 1000000.0 ) def update(self, buffer): temp_buffer = [] if self.use_py_spi: for x in range(self.leds): temp_buffer = temp_buffer + [i for i in buffer[x]] #self.spi.xfer2([i for i in buffer[x]]) self.spi.xfer2(temp_buffer) self.spi.xfer2([0x00,0x00,0x00]) #zero fill the last to prevent stray colors at the end self.spi.xfer2([0x00]) #once more with feeling - this helps :) time2 = time.time() © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 12 of 14
  • 13. Install LightShow Pi Now that we've got writing to the LED strip fast, and accessible from python running as root from anywhere, it's time to install the fantastic xmas light orchestration software (http://adafru.it/d5n), and update it to control the LED strip. Once you download the code (http://adafru.it/d5w) from bitbucket, follow the instructions to get it installed. I recommend installing to /home/pi/lightshowpi to avoid some installation issues. You can also change the INSTALL_DIR inside install.sh if you wish. Before running sudo ./install.sh, you should edit the file and change the INSTALL_DIR. Then run: sudo ./install.sh The end of the bash script sets up some environment variables in /etc/environment, but I also added it to my .bashrc at the end like so: export SYNCHRONIZED_LIGHTS_HOME="/home/pi/lightshowpi" export PYTHONPATH=$PYTHONPATH:/home/pi/RPi-LPD8806-master that second line is for the LEDs. Make sure sudoers also has this line so that the environment variable sticks around when you run things as sudo. This should already be there from a previous step. Defaults env_keep=SYNCHRONIZED_LIGHTS_HOME As a first step, try to run a song and see if the code throws any errors: sudo py/synchronized_lights.py --file /home/pi/some_random_music_file.mp3 Don't hear any sound? I had to change my audio out from the default HDMI to the onboard 1/8" jack: amixer cset numid=3 1 I also had to turn up the volume amixer set PCM 1 © Adafruit Industries https://learn.adafruit.com/raspberry-pi-spectrum-analyzer-display-on- rgb-led-strip Page 13 of 14
  • 14. Customize LightShowPi Our final step is to customize LightShowPi's config file, and run a special script that outputs to our RGB LED strip instead of turning GPIO pins on and off. go into the lightshowpi/config directory, and copy of defaults.cfg to overrides.cfg. Open overrides.cfg and make the following changes: gpio_pins = 7,0,1,2,3 # it doesn't matter what the numbers are, only that there are 5 for our 5 LED columns preshow = on:0,off:0 # no need to delay the start of the show! min_frequency = 50 # this is just preference since my speakers don't play much sound below 50Hz. You can specify the exact frequency ranges you want, too. _____________________________ Now, if you haven't already downloaded the code, grab the synchronized_lights_LED_strip.py (http://adafru.it/d5q) file and put it in the same directory with the original syncrhonized_lights.py file. This file writes out to our LED strip instead of the GPIO pins in the default script. You might need to make the file executable before running it: chmod +x synchronized_lights_LED_strip.py Try running with the new script: sudo py/synchronized_lights_LED_strip.py --file /home/pi/lightshowpi/music/some_song.mp3 And that's it! Hopefully you hear and see music! Depending on your strip, you might need to make changes to the display_column() function to adjust for what number LEDs make up your columns. For some more details on how the code works and changed made to the original script, checkout the longer instructable (http://adafru.it/d5x) I originally wrote. If you have any questions, you can use the feedback link on the left or contact me through my google + page: plus.google.com/+ScottDriscoll (http://adafru.it/d5t) or try the LightShowPi community (http://adafru.it/d5y) © Adafruit Industries Last Updated: 2015-01-16 09:30:12 AM EST Page 14 of 14