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

**URL:** <https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176>\
**Category:** Support\
**Created:** [July 1, 2017, 12:53pm UTC](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176 "2017-07-01T12:53:12Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 6, 2017, 12:10pm UTC](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176/21 "2017-07-06T12:10:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [July 10, 2017, 10:17am UTC](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176/22 "2017-07-10T10:17:13Z")

</div>

> [@alphanumeric](#):
>
> 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](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.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 10, 2017, 12:27pm UTC](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176/23 "2017-07-10T12:27:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 11, 2017, 12:33pm UTC](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176/24 "2017-07-11T12:33:39Z")

</div>

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.

[Previous page](https://forums.pimoroni.com/t/use-a-media-keyboard-with-your-phat-beat-can-it-be-done/5176.md?page=1)
