A summer greeting to all the followers of https://devopstribe.it/ 😉
My holidays are getting closer and soon I’ll be away from the chaotic city life… In my backpack, besides a couple of big bottles of Peroni beer, this year I’ll bring an “FM pirate radio transmitter” just in case somebody annoys my nap at the beach by listening to the radio at too high a volume (so common in Italy, ain’t it?). Intolerable! If you have taken drugs, it is very likely the music you hear doesn’t come from the neighbor’s speakers — in that case, I suggest you go and buy an ice cream at the nearest cafe.

If you wanna equip yourself with this powerful weapon, get the following things, or buy a Radio transmitter on Amazon (though is not cool to buy or download the app 😛 ):
- A Raspberry Pi
- A portable power supply for smartphones (solar energy would be perfect
) - A wireless pen drive
- A PHP script for the web interface management, like this https://github.com/lucky-sideburn/piratepiwave.git
- Software to grant the FM signal, for ex: https://github.com/rm-hull/pifm
- Last but not least, your smartphone!
Why point 4?
I was too lazy to fiddle around with GPIO to connect an LCD screen and a frequency controller, so I preferred to control the transmitter via my smartphone.
- At first let’s install a web server, Apache + PHP, on our Raspbian Jessie Lite (of course everyone is free to use their favourite OS or web server)
- If you are lazy, it is also possible to use my PHP script https://github.com/lucky-sideburn/piratepiwave.git (I am not a web-developer so YES the graphic interface is super basic and not cool!)
- Install https://github.com/rm-hull/pifm in /usr/local/pifm (in the docs you will find which GPIO you need to use to hook a handcrafted antenna made of metallic wire)
- Configure the wireless network interface controller in order to connect to your smartphone hotspot (from the Admin panel you will get the assigned IP)
- Set everything to autostart on boot, attach the external battery to the Raspberry, once ready from your smartphone launch http://$ipdelraspberry.
What shall we play on the “Zen moment harasser” radio?
Either you can copy and paste your fav audio tracks on /usr/local/pifm/sounds and modify the path of the file you want to use in the PHP script.
How do I select the FM frequencies?
… or you can use the handy bar on top if you want to tune in to a radio.

Or you can create buttons like these, with the selected radio frequencies.

There you are, the final result!

[wpvideo up4oWaQ9]
Happy holidays!!!
