FM Transmitter. Use the Raspberry Pi as an FM transmitter. Works on every Raspberry Pi board.
 
 
Go to file
Marcin Kondej f0354b15ee Custom bandwith parameter added 2019-01-07 17:50:34 +01:00
.gitignore Added more clear description 2018-12-29 03:18:27 +01:00
README.md ReadMe tweaks 2019-01-05 04:19:30 +01:00
acoustic_guitar_duet.wav Added more clear description 2018-12-29 03:18:27 +01:00
error_reporter.cpp Some minor code tweaks 2019-01-07 02:55:38 +01:00
error_reporter.h Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
mailbox.c Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
mailbox.h Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
main.cpp Custom bandwith parameter added 2019-01-07 17:50:34 +01:00
makefile Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
pcm_wave_header.h Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
preemp.cpp Some minor code tweaks 2019-01-07 02:55:38 +01:00
preemp.h Some minor code tweaks 2019-01-07 02:55:38 +01:00
sample.cpp Sample data resolution tweak 2019-01-07 03:22:35 +01:00
sample.h Some minor code tweaks 2019-01-07 02:55:38 +01:00
transmitter.cpp Custom bandwith parameter added 2019-01-07 17:50:34 +01:00
transmitter.h Custom bandwith parameter added 2019-01-07 17:50:34 +01:00
wave_reader.cpp Fixed issue #34, #23 - added DMA support 2019-01-05 04:06:16 +01:00
wave_reader.h Some minor code tweaks 2019-01-07 02:55:38 +01:00

README.md

fm_transmitter

Use Raspberry Pi as FM transmitter. Works on any Raspberry Pi board.

This project uses the general clock output to produce frequency modulated radio communication. It is based on idea originaly presented by Oliver Mattos and Oskar Weigl on PiFM project.

How to use it

To use this project You will have to build it. First, clone this repository, then use "make" command as shown below:

git clone https://github.com/markondej/fm_transmitter
cd fm_transmitter
make

After successful build You can start transmitting by typing:

sudo ./fm_transmitter -f 102.0 acoustic_guitar_duet.wav

Where:

  • -f frequency - Specifies the frequency in MHz, 100.0 by default if not passed
  • acoustic_guitar_duet.wav - Sample WAVE file, You can use your own

Other options:

  • -d dma_channel - Specifies the used DMA channel (0 by default), pass 255 in order to disable DMA and use CPU
  • -r - Loops the playback

Supported audio formats

You can transmitt uncompressed WAVE (.wav) files directly or read audio data from stdin, eg.:

sox star_wars.wav -r 22050 -c 1 -b 16 -t wav - | sudo ./fm_transmitter -f 100.6 -

Please note only uncompressed WAVE files are supported. If You expire "corrupted data" error try converting file, eg. by using SoX:

sox my-audio.mp3 -r 22050 -c 1 -b 16 -t wav my-converted-audio.wav
sudo ./fm_transmitter -f 100.6 my-converted-audio.wav

USB microphone support

In order to use a USB microphone input use arecord command, eg.:

arecord -D hw:1,0 -c1 -d 0 -r 22050 -f S16_LE | sudo ./fm_transmitter -f 100.6 -

In case of performance drop down use plughw:1,0 instead of hw:1,0.

Please keep in mind that transmitting on certain frequencies without special permissions may be illegal in your country.

New features

  • DMA peripheral support
  • works on any Raspberry Pi model
  • reads mono and stereo files
  • reads data from stdin

Included sample audio was created by graham_makes and published on freesound.org