This article continues from Create Wireless Radio with Raspberry Pi (1 of 2). Here, I explain how to build and configure it.
Building
It’s easy, only to follow my previous articles.
- OS Installation
First, install OS. It’s easy on Windows or Mac. (reference: The Way How I Installed RASPBIAN JESSIE LITE Into Raspberry Pi B+)
- Attach Wireless LAN Adapter
Make it connect to wireless LAN. I wrote how to connect to the LAN at How To Connect Raspberry Pi To Wireless LAN.
- Attach LCD Panel
Attach LCD panel. Please refer to Attach LCD Panel To Raspberry Pi B+.
Then, configure it.
Implement Radio Functions
To listen to internet radio, let’s use mplayer
. Now, execute the following command in Raspberry Pi and install mplayer
.
1 |
sudo apt-get install -y mplayer |
Next, get radio application. Execute the following command and get it.
1 2 |
cd /home/pi git clone https://github.com/KenjiOhtsuka/raspberrypi_radio.git |
It is the program that I created.
And execute the following command, make Raspberry Pi start internet radio automatically. The radio program to be started is written on the first line of /home/pi/raspberrypi_radio/autostart.sh
, you can change it freely. (I’m planning to make it enable to configure with another file.)
1 2 |
sudo vi /etc/rc.local # or sudo nano /etc/rc.local |
And insert the following line just above exit 0
.
1 |
sh /home/pi/raspberrypi_radio/autostart.sh & |
Then, reboot Raspberry Pi.
1 2 |
sudo shutdown -r now # or sudo reboot |
Did the radio program start automatically?
Push SELECT button, the you can see menu, and up and down buttons change menu items. Right button to proceed, left button to back. You can reboot and shutdown from the menu. You can see the IP address from the menu. I know there is still room for improvement.
Now, we can listen to the internet radio program without laptop computer.