Speaker PHAT no sound or light

Hello,

I have a phat stack with a drum and piano hat attached. Also a speak phat at the top. I followed these steps. https://opensourcelab.wixsite.com/raspi/pianohat

Also, I literally had it working since I got it. Then today, I ran the script to get it working (see below).

My issue is my speaker phat lights and sound are not working.
I have tried: - reboot the pi

  • unplug and plug in the speaker phat
  • run the script in the terminal for the speaker phat again.

This hasn’t worked yet. Looking for advice. Thanks

#!/usr/bin/env bash

python /home/pi/Pimoroni/pianohat/examples/simple-piano.py > /dev/null 2>&1 &
python /home/pi/Pimoroni/drumhat/examples/drums.py > /dev/null 2>&1 &

running=true

echo “Press control-c to quit!”

trap ctrl_c INT

function ctrl_c() {
killall python
running=false
}

while $running
do
sleep 1
done

Do you see any error output when you run simple-piano or drums?

What happens if, before you run the examples, you run:

sudo systemctl stop pulseaudio

Sweet. That works for the piano now but the drum doesn’t work now. Thoughts?

Drum works. Piano doesn’t. This is my script.

Could you use cat yourscriptname.py to get a readable output of your script and paste it here?

Use three backticks to format code:

```
like so
```

Just thought I would mention that I tested my speaker phat for the first time last night and audio did not work until I ran sudo systemctl stop pulseaudio either.

After that I listened to the bilge tank theme for the rest of the evening.

1 Like