(date of creation: February 2024)
This is a project to implement our own internet radio for everyday use. We created a simple GUI with a status line for the currently played song and radio station, a title bar with date, time and the current signal strength and eight buttons with configurable radio stations.
The program was built and tested for following hardware and software components:
Software:
- Python version: 3.12.2
- Raspberry Pi OS (based on Debian 12 (Bookworm))
Hardware:
- Raspberry Pi 4 Model B
- Display: Waveshare 4.3inch DSI LCD Capacitive Touch Screen Display 800x480 Resolution IPS Wide Angle Monitor for Raspberry Pi 4B/3B+/3A+/3B/2B/B+/A+ (any touch-sensitive display for Raspberry Pi 4 should work, but some may need further configurations within Raspberry Pi OS)
- HiFiBerry DAC+ (any HiFiBerry should work, but configuration of the Raspberry Pi OS will vary, see
step-by-step guide/HiFiBerry
)
If you need help setting up mira on your own Raspberry Pi please refer to the step-by-step guide
below for detailed instructions.
-
install Raspberry Pi OS with an imager on an SD-Card
-
sudo raspi-config
-
sudo apt install mpd
sudo apt install mpc
-
aplay -l
hw[2,0] <- card 2, device 0
-
sudo nano /etc/mpd.conf
uncomment the following and edit the device according to
step 4
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:2,0"
} -
sudo systemctl enable mpd
check if mpd is enabled
sudo systemctl status mpd
-
sudo systemctl start mpd
sudo systemctl restart mpd
-
mpc clear
mpc add [Radio-URL]
mpc play
-
mpc stop
-
#!/usr/bin/sh
sleep 5
/usr/bin/python ~/Github/mira/mira.py --fullscreen (the file path depends on where mira was copied to) -
sudo nano ~/.config/wayfire.ini
add a section at the end
[autostart]
(name) = path of file to be run on startup
-
ls -l /boot/firmware/overlays/hifiberry*
-
sudo nano /boot/firmware/config.txt
and add to section
[all]
:dtoverlay=hifiberry-dacplus
(the module that matches your specific HAT model)