Skip to content

Instantly share code, notes, and snippets.

@wehappyfew
Last active August 29, 2015 14:00
Show Gist options
  • Save wehappyfew/11305299 to your computer and use it in GitHub Desktop.
Save wehappyfew/11305299 to your computer and use it in GitHub Desktop.
#Step 1
#install the PiFm library
cd ~
mkdir pifm
cd pifm
wget http://www.icrobotics.co.uk/wiki/images/c/c3/Pifm.tar.gz
tar -xvf Pifm.tar.gz
#Step 2
#install the Sound Exchange library
sudo apt-get install sox libsox-fmt-all
#Step 3
#Create a single file to run,and not having to type the ugly lengthy command
sudo nano pifm_radioname.sh
#enter the command -> chnage the stream URL and/or the output frequency
sox -v .9 -t mp3 http://91.132.6.21:8001/ -t wav --input-buffer 80000 -r 22050 -c 1 - | sudo /home/pi/pifm/pifm - 94.8
#hit ctrl+O , enter , ctrl+X to save the file
#Step 4
#change the mode of the script to be executable
sudo chmod +x filename.sh
#Step 5
#run it by typing the following
./filename.sh &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment