IMPORTANT UPDATE JULY 2015: The BBC has changed the way it streams network radio – see here for details. And Fip has moved to http://audio.scdn.arkena.com/11016/fip-midfi128.mp3
In the summertime I built a Raspberry Pi radio that I could control via a web interface from my phone, and got to musing about some kind of Arduino-type shield that could snap on to a Pi to turn it into a little internet radio with a display, a few buttons and a speaker.
Well, blimey charlie, imagine my surprise when I discovered something pretty darn similar already exists! The good people at Pimoroni make and sell the splendidly-named Displayotron 3000 (not sure if it is related to Andre). This sits snugly on a Pi’s pins and gives you a 3-line LCD display with 3 strips of variable RGB backlights, a 4 way mini joystick with centre-press and a strip of eye-wateringly bright (but dimmable) white LEDs for use as a bar graph. It even has its own radio module, and I’ve been testing it out.
In short, I love it. It does everything my imaginary radio gizmo did, apart from having a built-in speaker (how about it, guys?). It goes perfectly with Pimoroni’s Pibow Coupe case (pictured) – this is a half-height case that leaves GPIO pins and other gubbins accessible.
It took a bit of tweaking to get it working. I started with a fresh install of Raspbian, updated my Pi with
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
I then installed the files from https://github.com/pimoroni/dot3k:
sudo apt-get install python-dev python-pip python-smbus
sudo pip install dot3k
git clone https://github.com/pimoroni/dot3k
I couldn’t get it to work, and then discovered that I had a bit more work to do: namely enabling spi and i2c. Details on how to do that are here and here.
I then installed psutil, another requirement:
sudo apt-get install python-psutil
My previous Raspberry Pi radios have all used mpd/mpc to play radio streams, but this one uses VLC, and I’m impressed. I installed VLC and added some stations to the config file*, and bingo! a cool little internet radio with a colourful screen and a well-designed menu allowing you to browse stations, view CPU load and temperature, change the volume and a very cool clock with an optional binary display and time-sensitive dimmer.
It’s a great piece of work – Pimoroni and @gadgetoid should be very, very proud.
My wishlist for tweaks:
- an alarm clock
- display time and station name at the same time
- ‘now-playing’ track info, as per my web-based radio
- weather info
- a record function
- a built-in speaker!
Time to retire my PiRadio made with an Arduino-driven LCD display and buttons.
* the radio bit of my config file now looks like this (starting with the world’s greatest radio station, fip. Mais oui.)
[Radio Stations]
fip32 = fip bas debit,http://mp3.live.tv-radio.com/fip/all/fip-32k.mp3
fip128 = fip haut debit,http://mp3.live.tv-radio.com/fip/all/fiphautdebit.mp3
radio1 = BBC Radio 1,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_p?s=1365376033&e=1365390433&h=a0fef58c2149248d6bff1f7b7b438931
radio2 = BBC Radio 2,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio2_p?s=1365376067&e=1365390467&h=d43dc8ae0f888809462a6cb7c389b46b
radio3 = BBC Radio 3,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio3_p?s=1365376123&e=1365390523&h=d53cf2a92272f3289b314a2251d23bc8
radio4 = BBC Radio 4,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio4_p?s=1365376126&e=1365390526&h=ed9a0642b30c422b07fbcd8683c52335
radio4x = BBC Radio 4Extra,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_he_radio4extra_p
radio5 = BBC 5Live,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_5live_p?s=1365376271&e=1365390671&h=e0d82133f35ae74d41d5eab6b9c150a6
6music = BBC 6Music,http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_6music_p?s=1365376386&e=1365390786&h=de40a9915206c4402c73e3766dc3fec0
einws = BBC WS News, http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-einws
nwpr = NWPR,http://69.166.45.47:8000
meat = MEATransMISSION,http://46.28.49.164:7184/
monocle = Monocle M24,http://radio.monocle.com/live
resonance = ResonanceFM,http://radio.canstream.co.uk:8004/live.mp3
purple = Purple Radio,http://uk1-pn.webcast-server.net:8184/
rte1 = RTE Radio 1,http://icecast2.rte.ie/radio1
share = Share Radio,http://tx.sharp-stream.com/icecast.php?i=shareradiorpmobilehigh.mp3