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.
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 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 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 or try the LightShowPi community
Now, if you haven't already downloaded the code, grab the synchronized_lights_LED_strip.py 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 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 or try the LightShowPi community
Text editor powered by tinymce.