This is my implementation of Scott Lawson's Audio Reactive LED strip using a Pi Zero W and Fe-Pi audio card
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Fe-Pi pinout.jpgProvided by the support at fe-pi.comJPEG Image - 150.46 kB - 03/21/2017 at 04:09 |
|
|
These directions are written under the assumption that you will be following along with the original documentation - I purposefully leave out large chucks as they are already documented here:
https://github.com/scottlawsonbc/audio-reactive-led-strip under the heading "Installation for Raspberry Pi"
Install Raspbian on a SD card - I used Jesse Lite, which came with the 4.4 kernel.
On the first boot:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
and add a network profile:network={
ssid="MyWirelessAP"
psk="MyWirelessPassword"
}
then configure the hostname, and under Localisation Options, configure locale, language, and keyboard using raspi-config. Also, enable SSHsudo raspi-config
SSHd hangs after authenticating until updating its config: https://expresshosting.net/ssh-hanging-authentication/
sudo nano /etc/ssh/sshd_config
And add this to the bottomIPQoS 0x00
After a reboot, You should be able to SSH in and remotely perform the rest of the configuration
The Fe-Pi drivers are now included in the 4.9 kernel.
From https://github.com/PiSupply/PaPiRus/issues/82, to upgrade to 4.9:
sudo apt-get update
sudo apt-get install rpi-update
sudo rpi-update
After rebooting, disable the built-in sound chip and enable the Fe-Pi by editing /boot/config.txt
(http://fe-pi.com/p/building-a-new-kernel?_ga=2.186172393.1565192209.1496548161-1555104412.1496548161)
sudo nano /boot/config.txt
Disable the built-in sound by changing this line:dtparam=audio=on
to
dtparam=audio=off
Enable the Fe-Pi by adding these values to the bottom:
dtoverlay=fe-pi-audio
dtoverlay=i2s-mmap
Restart again and then proceed to the next step
Install the Audio Reactive pre-requisite software as described at Scott Lawson's github site: https://github.com/scottlawsonbc/audio-reactive-led-strip
Skip the apt-get update if you updated in the prior step - no need to cause unneeded load on the Raspbian servers.
sudo apt-get install python-numpy python-scipy python-pyaudio
Install ws281x library:
sudo apt-get install build-essential python-dev git scons swig
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
scons
cd python
sudo python setup.py install
The values given for the newly created /etc/asound.conf and edits to the /etc/asla.conf are from a system with two sound devices. In a prior step, the built-in sound was disabled, so the Fe-Pi is the only sound device that should be enabled, meaning that it should be device zero.
In this case, the /etc/asound.conf should look like this:
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
and these two values in /usr/share/alsa/alsa.conf should equal 0, as show here:defaults.ctl.card 0 defaults.pcm.card 0
While you are editing the alsa.conf, also update the following from:
pcm.front cards.pcm.front pcm.rear cards.pcm.rear pcm.center_lfe cards.pcm.center_lfe pcm.side cards.pcm.side pcm.surround21 cards.pcm.surround21 pcm.surround40 cards.pcm.surround40 pcm.surround41 cards.pcm.surround41 pcm.surround50 cards.pcm.surround50 pcm.surround51 cards.pcm.surround51 pcm.surround71 cards.pcm.surround71 pcm.iec958 cards.pcm.iec958 pcm.hdmi cards.pcm.hdmi pcm.modem cards.pcm.modem pcm.phoneline cards.pcm.phonelineTo this:
pcm.front cards.pcm.default
pcm.rear cards.pcm.default
pcm.center_lfe cards.pcm.default
pcm.side cards.pcm.default
pcm.surround21 cards.pcm.default
pcm.surround40 cards.pcm.default
pcm.surround41 cards.pcm.default
pcm.surround50 cards.pcm.default
pcm.surround51 cards.pcm.default
pcm.surround71 cards.pcm.default
pcm.iec958 cards.pcm.default
pcm.hdmi cards.pcm.default
pcm.modem cards.pcm.default
pcm.phoneline cards.pcm.default
Because the Fe-Pi is hardwired to use GPIO18, I am using GPIO12 to talk to the LED strip. The two figuration updates I made were to the LED_PIN and LED_COUNT.
Edit the ~/rpi_ws281x/python/examples/strandtest.py file
LED_COUNT = 102
LED_PIN = 12
try running the test:
cd ~/rpi_ws281x/python/examples
sudo python strandtest.py
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates