Documentation for retroScreen (work in progress)
- Installing Software
- Running the Screen
- Using GPS
- Getting a script to run at boot
Personal preferences may vary, but I find it easier to solder the screen first, then solder on the header. The side of the board facing up is the side with all the labels for the breakouts and the outline for the screen as shown below:
For the older models (26-pin version), make sure the headers are within the box drawn around the first 26 pins:
Plug and Play!
If you bought the SD card image or created one from here, your retroScreen should work out of the box! Simply plug it into the GPIO header of the Raspberry Pi and power it on. The system stats script should run at boot by default. The scripts are stored in /home/pi/retroScreen, and if you want to run another example: sudo killall python sudo python Where script.py is one of the examples: system stats, network, barometer, clock or GPS.
If you already have a Raspberry Pi installation that you want to make retroScreen-capable, you need to go to the command line prompt. You can do this in several different ways:
- Connect an HDMI monitor and keyboard to the Raspberry Pi
- Connect the Raspberry pi to a network (eg. wifi) and log in using SSH
Select "Advanced Options" and enable SPI and I2C:
Enable SPI from the menu.
To install the software, run the following commands in the terminal: sudo apt-get install python-pip python-dev build-essential python-psutil sudo apt-get install python-imaging sudo pip install psutil --upgrade sudo pip install RPi.GPIO sudo pip install netifaces git clone https://github.com/adafruit/Adafruit_Nokia_LCD cd Adafruit_Nokia_LCD sudo python setup.py install Netifaces is needed for the network script, while psutil is used by the system stats script. Finally, downloading the examples: cd ~ git clone https://github.com/arthurv/retroScreen
Since SPI requires root access, to run the script (system stats for example), run: cd retroScreen sudo python systemstats.py
Adjusting the contrast
In the script that you are running, at around line 25 you will see the line: disp.set_contrast(55) You can change this value higher or lower - values of 30-65 seem to work but it depends on your particular screen!
sudo apt-get install gpsd gpsd-clients python-gps sudo dpkg-reconfigure gpsd add -n to parameters sudo killall gpsd sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
Getting script to run on boot
Simply add the line to /etc/rc.local (next to last line, before 'exit 0'):
python /home/pi/retroScreen/systemstats.py & However, if you want to change the font AND run the script on boot, please make sure you put the absolute path to the font, for example: font = ImageFont.truetype('/home/pi/retroScreen/fonts/atomicsc.TTF', 6)