Pirate Radio / pHAT BEAT -- can't control LEDs


I’ve just set up a Pirate Radio but can’t control the PhatBeat LEDs from Python.
If I set up using pHAT BEAT tutorial, the speaker-test works fine (audio plays, VU meter works) but test files and Python examples don’t control LEDs correctly – LEDs flash and flicker. I also tried VLC internet radio tutorial – works ok, including VU meter.
I’ve tried swapping PiZeros and also tested with Blinkt board to check for poor soldering. Blinkt works fine on clean install, but then stops working once phatbeat library installed.
Any suggestions for steps to debug further? I’ve run out of ideas…

Phat Beat light programming

No doubt the code for the VU meter is running in the background and clobbering any attempt you make to update the display.

Try- as a quick test- renaming the /etc/asound.conf file to /etc/asound.conf.backup, rebooting, and seeing if you can get some sense out of the LEDs.


Success! Yes – that got it going.

What is the better way of doing this? Is it the phatbeatd daemon?


It depends if you want the VU meter and your own customisation to co-exist. It’s possible to remove the Pi VU Meter stuff from asound.conf and use your own Python script to control the LEDs. What are you trying to accomplish overall?


In the short term, I was just testing that everything was working by running the test scripts!

But also thinking about converting an old speaker enclosure into media player – for which I might not want the meter at all. The pHAT BEAT would still be a neat solution as DAC and amp, even if I didn’t use buttons or LEDs.

Thanks for the steer. Maybe a note in tutorial would be useful in case others fall into same trap?