Raspberry Pi Wifi Internet Radio Player

For my first project after getting the Raspberry Pi ($35 Linux computer) I wanted to extend on a very good blog post I read from MightyOhm about turning a cheap Wifi router into an internet radio:

http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/

In that article he also had a cheap Linux device (the router) and was able to stretch it to be a mucic machine. I had no previous experience with Linux, always used and programmed on Windows machines. So I wasn’t sure what to expect when my Raspberry Pi finally arrived. After some initial hickups, I was able to get the device running:

I installed MPD, MPC, and SSH on it so that it could be a headless (meaning no monitor) device. Linux has been an experience, its entirely to cryptic for my taste, too many blind alleys to get stuck down. Raspberry Pi Wifi Internet Radio PlayerI was able to get it to install a tiny nano Wifi and wrote a small python program that hold a list of internet radio streams (and executed MPC commands).

I control which stream the player is listening to using the Adafruit Cobbler to breakout the pins so that the python program is just listening for button presses. When the button is pressed the player moves on to the next stream in the list. I can SSH (remote command line access) into the Raspberry Pi using Putty on my PC and edit the list as much as I want remotely (I even have an SSH access as an app on my phone). Here it is in action:

These links are the documentation for how to setup and run the Raspberry Pi as a Wifi Internet Radio:

The Raspberry Pi and where to buy it

The book “Getting Started with Raspberry Pi”

How to setup SSH on the Raspberry Pi

Edimax nano USB Wifi that worked great for me on the Raspberry Pi

Easy setup instruction for Edimax EW-7811Un Wifi

Adafruit Pi Cobbler

Adafruit instruction for buttons with the Pi Cobbler

Setting up MPD and MPC
(not original link, but this should get you there, if not see this for the archive.org version from a year ago)

Adding items to your MPC playlist – look under “installing mpd”Raspberry Pi Wifi Internet Radio Player schematic

Streaming radio lists – the .pls have to be downloaded and opened in a text editor for the “http//” items to add to MPC

Here is the python file:
radio.py
you will need to call “sudo python radio.py” to run it (as well as have Python installed)

Here is the instructions on how I created the radio station list:
Radio Station List – includes 20 stations, just run this command “sudo mpc save mine” to save the list as the “mine” playlist used by the radio.py file

here are some of the recent hardware choices:

Here is the latest video going over all the parts I am using to make this happen.  You certainly don’t need all of these to get it to work, but the upgrades do make it very interesting

 

For more detail: Raspberry Pi Wifi Internet Radio Player

About The Author

Scroll to Top
Read previous post:
3d Printed Raspberry Pi Security Camera

Update: If you like my instructable please vote for me in the Raspberry Pi and Epilog challenge. I will also...

Close