Monday, December 12, 2016
Antenna needs to be at least 7-14 inches long.
You need to log into your Rpi command line. All this can be done easily. First thing is to get some software from the software repo for doing software development. Don't worry it will not hurt too bad.
Update the system:
$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-update -y
Get the files you may need:
$ sudo apt-get install zip make gcc g++ mpg123
$ wget https://github.com/markondej/fm_transmitter/archive/master.zip
$ unzip master.zip
$ cd fm_transmitter-master
Now let's compile the project.
Get a FM radio and tune it to the frequency you have chosen
$ sudo ./fm_transmitter [-f frequency] [-r] filename
You should hear the file play on the radio. I used a transistor radio to see where the signal transmitted to. You can get into some fancy batch files so you can manage your music, but that is for a later time,
Download a few of your favorite mp3 files to the Pi, or you can scp them. Make sure to put them in the /home/pi/Music directory.
From the command line, type in the following command. The number 88.3 is the frequency the Pi will broadcast at. sudo /usr/bin/mpg123 -4 -s -Z /home/pi/Music/* | sudo /home/pi/pifm/pifm - 88.3
Note: If you want to stash your mp3 files in a different directory, simply change the directory path that's underlined in the command above.
Caution: Commands and filenames are case sensitive in Linux, so make sure you duplicate the exact capitalization of the previous commands.