Last active
August 29, 2015 14:00
-
-
Save wehappyfew/11305299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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