November 25, 2013 by aubreykloppers
Afrikaans Radio Stations:
Before I start, here is a copy/collection of 21 Afrikaans Radio Stations: https://www.dropbox.com/s/ye4peuoyie87kjv/Afrikaans%20Radio%20Stations.zip Extract to the WebRadio Directory. To access your WEBRADIO directory, all you have to do is open the IP Addess with your Windows Explorer, like this: \\<IP ADDRESS>
What is RaspyFi?
From the Website:
RaspyFi is a brand new Linux Distro made specifically for the Raspberry Pi. It aims to fully integrate Mpd into current debian realeases and to optimize it for Audiophile-quality music playback. The final result is aimed to resemble the notorius Voyage-mpd distro, but tweaked and optimized for the little arm computer. It will definitely turn it in a cheap and low-powered audiophile source.
This is quite a mouthful. Basically it is a (Headless) Media Player, giving you the ability to stream Online Radio, NAS (Shared) and local music using a very good looking website. I build additional hardware onto the PI to display songs playing, skipping forward/back and pushing volume up and down.
- Available at: http://www.raspyfi.com
- Forum and help: http://www.raspyfi.com/forum/
- User Manual here: http://www.raspyfi.com/raspyfi-user-manual/
- Quick Start Guide here: http://www.raspyfi.com/raspyfi-quick-start-guide/
- At the end of this is a Trouble Shooter with a fix for the ALL BLACK AND DEAD problem, please look…
The above links is nice to have, but tells you nothing on how to build RaspyFi wihout a USB Dongle or how to add a “Adafruit LCD + KEYPAD for RASPBERRY PI I2C INTERFACE (Kit Form) as found (In South Africa) here: http://robotics.org.za/index.php?route=product/product&path=227&product_id=694
The next Installation Steps is quite easily to follow to get this up and running.
- Always remember to “sudo su” before you do anything.
- If in doubt (or get errors), “reboot“!
Step 1, Network/Interfaces file:
iface lo inet loopback
#Remove the wired network because it
#slows down boot if it’s not connected.
#iface eth0 inet dhcp
iface wlan0 inet static
address <IP ADDRESS>
gateway <GATEWAY IP ADDRESS>
wpa-psk <SECRET PSK PASSWORD KEY>
Step 2, DNS/Resolve to the Internet:
220.127.116.11 and 18.104.22.168 is the Google DNS Servers. I use these as fallback DNS.
nameserver <ROUTER IP>
Step 3.1, Update:
Step 3.1, and install PIFace code: (Note: No PiFace, No Install!)
(Add at the end)
apt-get install git python-smbus i2c-tools python-dev python-rpi.gpio
git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git
Step 4, Fix Analog-out/HDMI-out:
(Add before “exit 0”)
Step 5, Set Output Device:
amixer cset numid=3 N
where the N parameter means the following:
0=auto, 1=analog, 2=hdmi.
Therefore, to force the Raspberry Pi to use the analog output:
amixer cset numid=3 1
Step 6, Forced MPD bind:
The following is to fix your website from becoming unresponsive after a reboot:
change “bind_to_address” to “127.0.0.1”
Step 7, Set Volume in WEBUI to “SOFTWARE”
to access the WEBUI and set your Volume to SOFTWARE to be able to manage your volume.
Step 8, Setting up LCD PIFace:
The following code is a modification of the code written by R.U.Serius from Sweden. I have adjusted the code to rather use:
- Presentation of play mode (playing/paused/stopped), Artist and Song name scrolling on line 1
- The elapsed song time, total song time and percentage of song played on line 2.
- Left button: Skip back
- Right button: Skip forward
- Up button: Volume UP
- Down button: Volume DOWN
- Select button: Toggle Play/Pause
One of the things I have noticed, if you get to the last item of your playlist and hit the “Skip Forward” button, the radio stops. All you have to do is hit the “Select” button and it will start again with the very first item in the playlist.
The code available here: https://www.dropbox.com/s/5tklcwdr74q29d7/songInfo.py
Save this code to: /home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate/
Remember to start the code automatically by doing a:
and add the following line at the end of your cron file:
@reboot python /home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate/songInfo.py
- All black and dead (If you installed the OS to SD and the SD does not boot):
- Follow the instructions to flash RaspyFi.
- Download the Raspbian Wheezy image and extract the files (Use PeaZip).
- Replace the .elf files on your SD Card.
The above error is apparently due to newer chips on the Raspberry PI. Read more here: http://www.raspberrypi.org/archives/3534
- Web Page Unresponsive:
- Restart mpd with: /etc/init.d/mpd restart
- Look at “Step 6” and set your mpd to bind to 127.0.0.1