===== How to build a Raspberry Pi Radio Transmitter ===== [[https://tutorials-raspberrypi.com/build-raspberry-pi-radio-transmitter/|Originalartikel]] [[https://www.qgelm.de/wb2html/wb385.html|Backup]]

The Raspberry Pi can be used pretty much for any conceivable application – as well as a radio transmitter. Frequencies from 1Mhz to 250Mhz can be used, including the usual radio frequencies between 88 and 108Mhz.
Depending on the position and antenna, the signal can be transmitted up to 100 meters.

In this tutorial, I will show what you need for it and how to set up the radio station on the Raspberry Pi.

Required Hardware Parts

I have used the following hardware parts:

Software

The basis is the library piFM. With this, it is possible to “misuse” GPIO 4 (pin 7) of the Raspberry as a transmitter. An antenna (either a real antenna or a simple wire) must be connected to it.

Firstly we load the software and compile it.

git clone https://github.com/rm-hull/pifm && cd pifm
make

Now that you’ve connected the antenna to pin 7 (the 4th pin from the top of the inner side), you’re ready to go. To do this, piFM must be started as root and a file specified (.wav format) to be played. In addition, the transmission frequency can be specified optimally (standard 103.3Mhz) and the audio sampling rate (in Hz).

An example call would be the following:

sudo ./pifm sounds/star-wars.wav 103.3 22050 stereo

Now, if you are looking for this frequency on your radio, you should hear the Star Wars melody and the previous noise should stop. At the end of the song, it will be played again from the beginning.

In addition, the library can be easily integrated into Python: