I’m using ‘Pygame’ the Python game program, to design and build a dynamic user interface. In other words a full screen window with touch screen control, that will display content including the clock face, weather radar maps, and many other media types. (As I don’t have a touch screen yet, I’ll just set it up to work on any monitor. For now, I am using a 19” monitor through the HDMI output of the PI) Here is the code I used to install it.
$ sudo apt-get install mercurial
$ hg clone https://bitbucket.org/pygame/pygame
$ cd pygame
$ sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
$ sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
$ sudo apt-get install python3-dev python3-numpy
$ python3 setup.py build
$ sudo python3 setup.py install
The instructions that I followed are here:
Don't ‘select all’ as it suggests, but do it line by line pressing return between copy and paste into terminal (right click, choose copy) ‘ctrl/shift v' to paste then enter. It will ask if you want to continue ‘y/n’, wait for prompt each time, it may take a while. It' s not finished if there's a white square. When it is done, it will go back to the command prompt.
I will be using Google docs in the Google cloud to write or copy/paste all the Python code. That way I can easily create what I need on my laptop or desktop computer or even in breaks at work, then open it in a web browser on the RPI. From there I can just use it as reference or copy/paste into the Python terminal window.
No comments:
Post a Comment