My 1st 3d design for Pi internet radio project.
Video https://youtu.be/fZjdzmTjjnQ
3d designs to download https://www.thingiverse.com/thing:2982688
1) HW
To 3d print case : download 3d parts here
https://www.thingiverse.com/thing:2982688
Parts used :
Level shifter for display https://bit.ly/35jRWmj
LCD 2 lines https://bit.ly/2KtH1d9
PCB for keys https://bit.ly/2N9BMRN
Keys https://www.gme.cz/mikrospinace-do-dps
Keys are connected to GPIO :
GPIO17 – pin 11 – button 1
GPIO 19 – pin 35 – button 2
GPIO 20 – pin 38 – button 3
GPIO 21 – pin 40 – button 4
GPIO23 – pin 16 – button 5
GPIO18 – pin 12 – button 6
common GND – pin 4
Keys 1-5 will start playback of radio station at that position within mpc playlist
Key 6 is stop
LCD display :
connect
GND – to any GND pin
VCC- to any VCC 5V pin
SDA – to GPIO 2 – pin 3
SCL – to GPIO 3 – pin 5
all connections are via leveshifter because Pi is 3.3V and display is 5V.
refer to https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide
2) SW
Python code :
https://www.vancura.cz/programing/Raspbery/radio.py
MPC installation :
sudo apt-get update
sudo apt-get install mpd mpc
add Your stations
mpc add http://icecast2.play.cz/radio1.mp3
mpc add http://icecast5.play.cz:8000/expres128mp3
mpc add http://icecast4.play.cz/crowave-64.mp3
mpc add http://icecast5.play.cz/cro1-64.mp3
mpc add http://icecast3.play.cz/cro3-64.mp3
3) RaspPi config
set audio output to HDMI and enable I2C in
sudo raspi-config