I recently took delivery of the Pirate Radio kit and had a lot of fun making it into an Airplay Speaker using the awesome tutorial written by the Pimoroni Crew! However… I had other plans!

My kid loves his music and often hogs our TV watching his favourite songs on YouTube so I decided to turn my Pirate Radio into a Pirate Jukebox! I’ve written a simple Python script based on the examples in the Phat Beat library to play a random song from a directory of MP3s.

I have most of the buttons functioning: the FFWD button plays a random song, PLAY/PAUSE pauses the song, RRWD goes back to the start of the song and the volume buttons do the expected job. Not using the power button right now (mostly because it’s not really accessible on the Pirate Radio kit)

Quick demo video here (sorry for the crappy filter, my kid insisted)

If you want to make something similar, I’ve uploaded the code to Github here:

Quick update! Being an inexperienced python dev I was certain this script was going to crash or be unreliable but amazingly it’s now been going for 48 hours and is working solidly (including 24 hours of continuous play with the volume off!)! I’m really quite surprised there are no memory leaks or dodgy code exceptions that are causing it to break but so far, so good!