Use a media keyboard with your pHat Beat, can it be done?

Sorted it out, I had to add a delay, 15 seconds seems to work OK
@reboot sleep 15;sudo python3 /home/pi/PRRC.py &

Something I noticed is when I use the play pause on my remote, the LED matrix freezes with what ever LED’s where on when I pressed the button. Pressing the physical button on the phat beat though and they all turn off. I guess that’s because My remote is talking to VLC Radio and not the phat beat directly?

You’re correct- the play/pause handler in phatbeatd explicitly clears the LEDs, see here: https://github.com/pimoroni/phat-beat/blob/master/projects/vlc-radio/phatbeatd/usr/bin/phatbeatd#L202-L207

One solution to this, is to merge your code for controlling via a remote into phatbeatd. It’s not a very straight forward procedure, but it’s certainly possible.

Great, thanks a bunch. I’ll have a go at it, and will post back with my results. =).

I chickened out, for now. I just added
import phatbeat
and the
time.sleep(0.1)
phatbeat.clear()
phatbeat.show()
to my file. Seems to work OK.

I may still have a go at rolling my code into the main file, just not today.

1 Like