Skip to content

codeskyblue/fm_transmitter

 
 

Repository files navigation

fm_transmitter

Use Raspberry Pi as FM transmitter. Now supports both RPi 1 and RPi 2 boards.

This project uses the general clock output to produce frequency modulated radio communication. It is based on idea originaly posted here: http://icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter, but does not use DMA controller in order to distribute samples to output (clock generator),so sound quality is worse as in PiFm project and only mono transmition is available but this makes possible to run it on all kind of boards.

Compile

sudo apt-get install make gcc g++
make

How to use it

To compile this project you can use Code::Blocks IDE (http://codeblocks.org/) or alternatively convert CBP file into makefile.

Then you can use it by typing:

sudo ./fm_transmitter [filename] [frequency]

You can open WAVE files or read audio data from stdin, i.e.:

sox star_wars.wav -r 44100 -c 1 -b 16 -t wav - | sudo ./fm_transmitter - 100.0
arecord -D hw:1,0 -c1 -d 0 -r 44100 -f S16_LE | sudo ./bin/Debug/fm_transmitter - 100.6

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

New features

  • works both on RPi 1 and RPi 2
  • reads mono and stereo files
  • reads data from stdin
  • based on threads

About

Raspberry Pi as FM transmitter, custom source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.3%
  • C 10.8%
  • Makefile 1.7%
  • Shell 0.2%