PhatBeat + IR Receiver - Extending Pirate Radio

Hi all,

Hoping I can get a bit of help.

I’ve just gone a bit nuts buying Raspberry Pi’s to put together a number of projects over the next few months - also to learn Python as I mostly use JavaScript/Ruby/C/Swift for my job and want to get in on some Machine Learning goodness eventually.

One of the kits I bought is the Pirate Radio kit with the intention of building my 2.5 year old son a bedtime audio book device.

I work as a software developer so am confident of my coding chops but I know next to nothing about hardware. One of the ideas I’ve got for modifying the Pirate Radio kit is connecting an IR receiver to the Zero W along with the PhatBeat and using a little remote I have lying around to give the radio some extended functionality - current thoughts are:

  1. Mode switching via remote so I can switch it between being an AirPlay speaker, an internet radio and an AudioBook player.
  2. Adding a button via the remote to give it a timed fade out so it gradually gets quieter.
  3. More general commands like play/pause/fast-forward via remote.

So my core question is this:

Given I know next to nothing about hardware - does anyone have any idea how (or even IF) I could attach an IR Receiver to the Zero W whilst the PhatBeat hat is attached? i.e. given the PhatBeat will cover all the GPIO pins could I just solder the IR receiver onto the correct GPIO pins underneath the board or is that going to cause me issues?

If the IR receiver is a no go I could probably write a little iOS app to allow control via the Bluetooth module but I kind of want to get the remote working :)

Thanks for the help - if I get this working I’ll open source the code! :)

Welcome to the forum!

There’s this:

although I can’t recommend anything in particular. BCM Pins 14 & 15 are the UART pins on the Pi and you should be able to write something to read/write them to control a Pi.

I had a go at that a while back. I got it to work, but my setup wasn’t reliable for some reason. My remote would just stop working and I’d have to get up and push a button anyway. Might have been the really inexpensive (cheap ;) ) remotes I was using though.
Here is the thread if you want to have a go yourself.


I have one of the original FLIRC’s lying around the house somewhere I think - used to use it on a media PC. Might see if I can dust it off as a first pass at this - end goal is to just wire an IR receiver direct to the GPIO but proof of concept with a FLIRC is a nice idea!

EDIT: Looking at your code right now - damn that’s nice - you’ve done a really large part of the initial work I was thinking about doing. Do you mind if I use your code as a base and extend from it? We could open source it at that point, do some setup/config stuff and host it on GitHub for anyone else who wants to run something similar.

I started out just wanting to use the media keys on a mini wireless keyboard. Play, pause, volume up down etc. Then I remembered I had a FLIR in my parts box and got it out. That let me use an IR remote control which I figured would be better, and it freed up my mini keyboard for something else.
I had it all working, it just wouldn’t stay working. I likely needed some error handling code in there some place but that was and still is above my skill level.
Eventually I had to do a clean install and just didn’t bother setting up the remote control function. I now have some easy to push mini arcade buttons on top of my pirate radio enclosure.