tkinter GUI

tkinter is a python module for building graphical user interfaces. The alarm clock radio project will use a tkinter interface.

The music symbol changes from FM, to Songs to internet Radio. In the alarm control row, the On button turns the alarm on or off. The GUI doesn't do much except to demonstrate how things should work. The end goal is to integrate the songPlayer, fmPlayer and iRadioPlayer with the GUI scripts.

Equipment:

  • Rapsberry Pi 3 B+ running raspbian

  • 2.8 inch Capacitive Touch PiTFT already assembled

Step 1. Raspberry Pi setup

Step 2. Setup PiTFT 2.8 inch capactive touch screen

Step 3. Download Digital-7 Font

Digital-7 is a very cool font that looks like time on an alarm clock

On Raspberry Pi, open a terminal window. Download and install digital-7 font:

$ cd ~/.

$ mkdir .fonts

$ cd .fonts

$ wget https://github.com/lleevveell66/HyperClock/blob/master/fonts/digital-7-mono.ttf

$ sudo fc-cache -f -v /home/pi/.fonts

Check if digial-7 is installed:

$ sudo fc-cache -f -v

Step 4. Download the GUI script from github

$ wget https://raw.githubusercontent.com/dumbo25/tkinter-alarm-clock-radio-gui/master/gui.py

Step 5. Download the buttons from github

Use the blank button to create your own buttons

Got to home directory and then create an images directory under the radio directory

$ cd ~/.

$ cd radio

$ mkdir images

$ cd images

Download all the button images

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/back.gif

$ wget "https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/blank button.gif"

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/down.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/iradio.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/songs.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/next.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/off.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/on.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/play.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/fm.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/stop.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/up.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/volumeup.gif

$ wget https://github.com/dumbo25/tkinter-alarm-clock-radio-gui/blob/master/volumedown.gif