Skip to content

scottoss/radiopi2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RadioPi - a raspberry pi internet radio

Radio Pi see more at Screenshots

What is needed?

Hardware

  • a Raspberry Pi

  • a WLAN dongle (for Raspberry < V3)

  • a 3.2" touchscreen LCD Display (320x240 px)

  • (optional) an acryl case that fits with the display

  • (optional) some powerbank

Software

  • Raspbian OS (a Raspberry Pi Desktop Linux)

  • LCD touchscreen display driver (see your documentation where to obtain this)

additional content included

Changes

Raspbian Buster

Audio setup

There has been some changes in the sound configuration. This seems to block activating the jack audio output the way that is described in the official raspbian documentation.

Both 'amixer cset numid=3 1' and 'sudo raspi-config' don’t work. It seems to be that now HDMI and JACK audio are configured as two different sound cards.

There is a workaround by setting the default sound card. First list all sound cards with the command

> cat /proc/asound/cards
 0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1
                      bcm2835 HDMI 1
 1 [Headphones     ]: bcm2835_headphonbcm2835 Headphones - bcm2835 Headphones
                      bcm2835 Headphones

Headphones (JACK audio) is located at card 1. Now create a new file '/etc/asound.conf' that contains the lines

defaults.pcm.card 1
defaults.ctl.card 1

After restarting your Raspberry audio jack will be selected by default.

Wlan scan

There has been a change in Raspbian concerning the output format when scanning for wlan. This has been fixed in the newest version of RadioPi. Both the new and old way are now suppored.

Setup

update raspbian
sudo apt-get update
sudo apt-get upgrade
install the LCD 3.2 display fb-driver
  • install the kernel driver and route the desktop to the display

  • you can both use a mouse or the touch display for input

  • See your documentation how to setup the driver.

The following instructions f.e. will install a display from joy-IT:

# append the following lines to /boot/config.txt
sudo nano /boot/config.txt

dtparam=spi=on
dtoverlay=joy-IT-Display-Driver-32b-overlay:rotate=270,swapxy=1

# append the following parameter to the *first* line of the file
sudo nano /boot/cmdline.txt

fbcon=map:10

# create a file with the following content:
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
    Identifier "calibration"
    MatchProduct "ADS7846 Touchscreen"
    Option "Calibration" "160 3723 3896 181"
    Option "SwapAxes" "0"
EndSection

# change the following line of the file
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Option "fbdev" "/dev/fb1"

# get and install the display driver
wget anleitung.joy-it.net/upload/joy-IT-Display-Driver-32b-overlay.dtb
sudo cp joy-IT-Display-Driver-32b-overlay.dtb /boot/overlays/joy-IT-Display-Driver-32b-overlay.dtbo

# install and copy a file for the touch input
sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
TIP: if you want to flip the display upside down, change the following parameters
# change the screen rotation to 90°
sudo nano /boot/config.txt

dtparam=spi=on
dtoverlay=joy-IT-Display-Driver-32b-overlay:rotate=90,swapxy=1

# flip the touch screen calibration values
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
    Identifier "calibration"
    MatchProduct "ADS7846 Touchscreen"
    Option "Calibration" "3723 160 181 3896"
    Option "SwapAxes" "0"
EndSection

# THAT'S ALL :)
install additional software
  • pulseaudio and vlc for playback

  • python3 (may be already installed)

  • some python3 libraries

sudo apt-get install pulseaudio pulseaudio-utils
sudo apt-get install vlc
sudo apt-get install python3 python3-pip python3-pygame
install RadioPi
  • copy folder RadioPi to /home/pi

  • make shell-scripts executable

pi@raspberrypi:~ $ cd RadioPi
pi@raspberrypi:~/RadioPi $ chmod +x *.sh
pi@raspberrypi:~/RadioPi $ chmod +x network/*.sh
test installed libraries
pi@raspberrypi:~/RadioPi python3 testlib.py
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
=> all required python libs available
make RadioPi start at boot
mkdir ~/.config/autostart
cp radiopi.desktop ~/.config/autostart
reboot system
sudo reboot

Problems? send a note to christian at dreierschach.de :-)

Screenshots

All views - now with clock

Radio Pi

Clock setup view - set actual, wake and sleep time

Radio Pi

Settings view - no connection

Radio Pi

Settings view - change WLAN

Radio Pi

Select view - initially loading list of radio stations

Radio Pi

Select view - with list of stations

Radio Pi

Select view - only show favourites

Radio Pi

Select view - filtered by "SWR" string

Radio Pi

Play view - play selected radio station

Radio Pi

Screensaver

Radio Pi

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published