FM Transmitter. Use the Raspberry Pi as an FM transmitter. Works on every Raspberry Pi board.
 
 
Go to file
root 2fa240f72d add Makefile for fm_transmitter 2015-08-07 12:39:55 +08:00
.gitignore add Makefile for fm_transmitter 2015-08-07 12:39:55 +08:00
Makefile add Makefile for fm_transmitter 2015-08-07 12:39:55 +08:00
README.md add Makefile for fm_transmitter 2015-08-07 12:39:55 +08:00
audio_format.h read from stdin 2015-07-28 15:47:53 +02:00
error_reporter.cpp read from stdin 2015-07-28 15:47:53 +02:00
error_reporter.h read from stdin 2015-07-28 15:47:53 +02:00
fm_transmitter.cbp read from stdin 2015-07-28 15:47:53 +02:00
fm_transmitter.depend Working with arecord, streaming live 2015-07-30 21:55:35 +02:00
fm_transmitter.layout Stdin read ready 2015-07-30 11:13:57 +02:00
main.cpp Notify when using stdin 2015-07-30 21:58:34 +02:00
pcm_wave_header.h read from stdin 2015-07-28 15:47:53 +02:00
star_wars.wav Raspberry Pi 2 support 2015-04-01 23:12:41 +02:00
stdin_reader.cpp Working with arecord, streaming live 2015-07-30 21:55:35 +02:00
stdin_reader.h Working with arecord, streaming live 2015-07-30 21:55:35 +02:00
transmitter.cpp Working with arecord, streaming live 2015-07-30 21:55:35 +02:00
transmitter.h Fixed WAVE's 2015-07-29 01:36:54 +02:00
wave_reader.cpp read from stdin 2015-07-28 15:47:53 +02:00
wave_reader.h read from stdin 2015-07-28 15:47:53 +02:00

README.md

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