A simple and yet powerful FM transmitter can be created using a Raspberry Pi and a program written by members of the Imperial College Robotics Society (ICRS). The source and a brief explanation of the application can be found on the ICRS’s wiki (see Turning the Raspberry Pi into an FM transmitter).
In executable included in the archive available on the wiki page did
not work for me initially. Instead, I compiled the source code using
gcc -D _BSD_SOURCE -std=c99 -1m pifm.c
. Then I ran the
application with sudo ./a.out sound.wav 100.0
. Note that
the default broadcast frequency is 103.3 Mhz and the Python source file
supplied in the archive is superfluous.
A demonstration of the entire setup is available on YouTube (see Raspberry Pi as FM Transmitter). An extensive conversation including improvements to the source is available on Reddit. One post even provides an implementation that includes stereo!