Skip to content
IOT-MCU edited this page Aug 18, 2020 · 10 revisions

Welcome to the Mini-PiTFT-for-Raspberry-Pi wiki!

1.Hardware install

2.Python Installation of RGB Display Library

Once that's done, from your command line run the following commands:

sudo pip3 install adafruit-circuitpython-rgb-display
sudo pip3 install --upgrade --force-reinstall spidev
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

If that complains about pip3 not being installed, then run this first to install it:

sudo apt-get install python3-pip

DejaVu TTF Font

Raspberry Pi usually comes with the DejaVu font already installed, but in case it didn't, you can run the following to install it:

sudo apt-get install ttf-dejavu

Pillow Library

We also need PIL, the Python Imaging Library, to allow graphics and using text with custom fonts. There are several system libraries that PIL relies on, so installing via a package manager is the easiest way to bring in everything:

sudo apt-get install python3-pil

NumPy Library

A recent improvement of the RGB_Display library makes use of NumPy for some additional speed. This can be installed with the following command:

sudo apt-get install python3-numpy

Python Stats Example

We can also display some stats about your Pi such as the IP address, resource usage, and even the CPU Temperature. Start by saving the code below as stats.py in your home directory on your Raspberry Pi.

1.14 Pi TFT

Pi TFT1.14 inch v1.0 stats.py

Go ahead and run the script by typing:

python3 Pi TFT1.14 inch v1.0 stats.py

It should display some system information.

1.3 Pi TFT

Pi TFT 1.3 inch v1.0 stats.py

Go ahead and run the script by typing:

python3 Pi TFT 1.3 inch v1.0 stats.py

It should display some system information.