FM Radio Station Transmitting With Raspberry Pi

View previous topic View next topic Go down

FM Radio Station Transmitting With Raspberry Pi

Post by jamied_uk on 23rd June 2016, 14:58

FM RADIO PI (FM RADIO STATION)

Easy Method
Code:


sudo mkdir fm
cd fm
sudo git clone https://github.com/markondej/fm_transmitter.git

cd transmitter/

sudo apt-get install -y mpg123
sudo apt-get install -y make gcc g++

sudo make


cd
sudo raspi-config
Now select change password and then console auto login
now expand file system and reboot your rpi


gedit (or nano)

sudo gedit .bashrc

now add the following

cd /home/pi/fm/fm_transmitter
sudo ./fm_transmitter -f 96.5 -r star_wars.wav


Now choose a pin to use for antenna ( default is pin 4) count from the let hand pins from the top the screen ribbon cable would be orientated to the top

~~~~~~~~


manual Method

https://youtu.be/NmR-DJyF2G0


https://github.com/markondej/fm_transmitter


How to use it

To compile this project use commands below:



Code:
sudo apt-get install make gcc g++

make


AFTER INSTALLATION USAGE:

Then you can use it by typing:

Code:
sudo ./fm_transmitter [-f frequency] [-r] filename



WAVE Files


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



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


USB sound-card



To use a USB sound-card type this:



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



Some devices have problems with the one up (there is a warning in the terminal like buffer overflow after a few seconds - the transmitting is slow and will stopp), then you can use the following:



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



Law



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

New features



    works on RPi 1, 2 and 3

    reads mono and stereo files

    reads data from stdin

    based on threads
avatar
jamied_uk
Admin

Posts : 2151
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum