Introduction: Touch Screen for the Raspberry Pi Internet Radio
A touch screen display extension for the Raspberry Pi internet Radio with Flask for stand alone use of this nice radio application.
To keep it just as small as the Pi, a 3,5 inch touch screen display is used.
With the use of such small touch screen display, there is a need for big buttons (or very small fingers).
Within a 3,5 inch display, there is just enough room for a station list and seven large buttons, to keep it simple, we use the same structure of user interface as the original Pi radio web interface.
The software for this project is written with tkinter, the GUI tool of Python and part of the Pi software.
Step 1: What Do We Need:
- The Raspberry Pi with the internet radio application already installed.
- 3,5 inch touch screen display (I’ve bought mine here, the housing is rubbish and already moved to the garbage can, find a better one)
Step 2: Install Display Driver
- Place the display on the GPIO connector
- Follow the installation step 3 and stap 4 instructions as described on the Elecrow WiKi.
- Calibrate the touch screen, procedure on the same page as step 3 and 4.
- For this application, skip the installation of the soft keyboard.
- Reboot your Pi
After the reboot, the Pi shows the same GUI on the 3,5 inch touch screen as the HDMI monitor.
Rotate the screen orientation 90 degrees, edit ;
sudo nano /boot/config.tx
move all the way down to the end of the file and add the line:
save this file
Step 3: Install the Large Button GUI
- Copy the WinRadio.py file in the same directory as your internet radio program, mine is placed in /home/pi/flask_dev.
- Add the text below at the end of the file: /etc/xdg/lxsession/LXDE-pi/autostart
Note 1, do not add this command anywhere else, the LDXE GUI must be running before WinRadio.py starts.
Note 2, Don’t forget the 3 after Python, the program runs in Python3!
- Restart the Pi
Ok, here is the GUI program with the large buttons:
I think the program is well documented. It's my first tkinter program, so there is much room for improvement, but so far I'm happy with the functionality.
So any criticism and suggestions, please leave them in the comments below. :)
Thanks for reading!