banner
News center
Affordable prices for quality goods.

How to Build a Raspberry Pi Touchscreen Internet Radio

Nov 02, 2023

With a Raspberry Pi single-board computer and a touchscreen display, it's fairly easy to make your own inexpensive internet radio with a GUI.

Why spend big bucks on a commercially available internet radio device when you can create your own DIY version, complete with a touchscreen interface?

We will show you how to build a Raspberry Pi-powered internet radio that’ll allow you to enjoy your favorite radio stations from across the globe. The touchscreen UI offers a modern and user-friendly experience, which can help you enhance your existing home audio setup.

First and foremost, building DIY projects such as the touchscreen Raspberry Pi internet radio provides a great learning opportunity for students, technology enthusiasts and DIY hobbyists.

Besides, it allows you to access thousands of radio stations from around the world. You can listen to your favorite radio stations for music, news, infotainment, talk shows, etc. You can also carry it with you and connect it to any audio setup via aux or Bluetooth and start listening to your favorite radio stations.

In addition, buying a radio station with a touchscreen is hard due to availability, Even if you do find it, it can be expensive and cost you a few hundred dollars. With a Raspberry Pi, you can build a touchscreen internet radio for a fraction of the price.

You will need the following items to build a DIY touchscreen internet radio:

Once you have gathered all the required items, follow the steps below to build a DIY internet radio.

First, you'll need to install the Raspberry Pi's operating system onto the microSD card using your Windows, Linux, or macOS computer. For this project, the recommended operating system is the official Raspberry Pi OS, which you can easily flash to a microSD card by using the Raspberry Pi Imager tool.

If using the official Raspberry Pi Touch Display, connect the Display Serial Interface (DSI) cable (the display's ribbon cable) to the Raspberry Pi's DSI port and then connect the touchscreen's power supply to the Pi's GPIO pins.

If you are going to use the DFRobot 7" inch display, connect the display to the Raspberry Pi via its HDMI port. To provide power and enable the touchscreen, connect the micro USB cable to the display and the USB port on the Raspberry Pi.

With the touchscreen display connected, insert the microSD card into the Raspberry Pi and connect the power supply to boot the device.

Once booted, follow the on-screen instructions to configure the Raspberry Pi. You also need to do the following:

Once you have made the required changes and enabled SSH for remote access, reboot the system. After the reboot, you can connect to your Raspberry Pi via your Windows or macOS/Linux computer using the PuTTY or Terminal app respectively.

Once you are logged in via SSH, run the following command to update and upgrade the Raspberry Pi's software packages:

After the update, add the main pi (or differently named) user to the TTY group:

This will open the rules.d file in the Nano text editor. Make the following changes. First, find:

And change it to:

Press Ctrl + X then Y and Enter to save the changes. These changes are important to ensure Pygame does not crash when started by the pi (ot differently named) user.

Next, install the Pygame library needed for the Peppy Player GUI:

Install, the patched version of libsdl1.2 (Simple DirectMedia Layer library):

To install different libraries for Python 3, you will need the pip3 tool. Install it with:

Also, install the VLC media player and VLC Python wrapper for Peppy Player to communicate with the VLC player:

Once you have installed pip3, run the commands below to download and install the required libraries on which the Peppy Player depends (i.e. dependencies):

Also, run the following command so that you don't need to be the sudo/root user to control the screen backlight:

Clone the Peppy Player GitHub repository and install Peppy Player with the following commands:

Once cloned, you can start Peppy Player as a service:

Configure the amplifier driver by opening the file /boot/config.txt:

Add the following line at the end of the file:

If using the DFRobot 7" inch display, add following lines as well:

Comment out the following line to disable the default onboard audio system:

Press Ctrl + X then Y and Enter to save. Next, open the Peppy config file:

Make changes to the [volume.control] section:

Press Ctrl + X then Y and Enter to save. Then reboot the Raspberry Pi:

If you encounter an error, retry the process. Or re-flash Raspberry Pi OS and then follow the steps again to install and set up the Peppy Player for the touchscreen internet radio.

Alternatively, you may flash the readymade Peppy player disk image to the Raspberry Pi microSD card based on the display you have. This is called Express installation, although it didn't work for us when we tried it headless with the disk image for the Official 7" touchscreen display.

You can use an external amplifier or any device with AUX input and connect a cable between the Raspberry Pi's 3.5mm audio jack and the amplifier's AUX input port (could be 3.5mm or larger).

You can also use a Bluetooth speaker, but this requires additional configuration and setup within Raspberry Pi OS.

A touchscreen internet radio is of the best DIY Raspberry projects you can build, and for little expense. It enables you to access and listen to a wide range of radio stations from around the world. Also, you can connect it to your existing AVR or amplifier (audio system) and enhance the latter with touchscreen radio controls.

Ravi is an expert tech explainer, an IoT enthusiast, and a Linux lover with a background in big data and app development. He's a tech geek with over 7 years of experience in creating DIY tech and how-to guides on data recovery, file repair, Exchange Server, Outlook, Microsoft 365, Windows, Mac, Linux, iOS, and smart home.

Raspberry PiTouchscreen displayrules.dCtrl + XYEnter/boot/config.txtCtrl + XYEnter[volume.control]Ctrl + XYEnter