Turn Pi to into FM Transmitter and use FM as output


#1

Hi,

this looks interesting for e.g. using a raspi in a car without a AUX connector:
http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter
Any idea whether this might fit as output method into pimusicbox?


#2

Any thoughts on this? I’d love to hear if there’s some possibility to use the raspi as an streaming FM transmitter! :slight_smile:


#3

WOW, I didn’t know that You can make a FM radio transmitter out of gpio pin ! :smiley: LOL
I think that to make it work with mopidy You need just set the autio output to some file and pipe that file to the pifm script.


#4

Hm, sounds easy! Thanks for your reply :slight_smile:

Do you have any idea of a code snippet regarding how to set the output to a file and then to pifm? I’m still kinda lost here :smiley:


#5

You need to be careful when implementing something like this, it may not be legal in your country. I really have no idea why that page doesn’t have the appropriate warning, they should know better.


#6

luckily, it’s allowed in my country. And the transmitter would not be sending its signal over the whole city, I guess.

however: given that there’s an appropriate warning and I’m sure I may do this: How could this be done within PiMusicbox, software-wise?


#7

the audio output is set in mopidy.conf, search on the forum how to do it. this part should be very similar to what is needed to setup snapcast with mopidy: https://github.com/badaix/snapcast/blob/master/doc/player_setup.md#mopidy. for the second part i believe that this should make it work:
cat [mopidy output file] | sudo ./pifm -


#8

I did it some time ago, I used some code to make a virtual input device and then routed a virtual output to the input and let pifmrds transmit from this virtual input device


#9

Cool, thanks guys for your feedback, nice to hear that this really works! :slight_smile: Need to pick up my raspi and really try that out.

@Niekert: Do you know the needed code?

And is it possible to add this as a setting in the interface somehow?