Adafruit Mini Pi TFT

The Adafruit Mini PiTFT - 135x240 Color TFT Add-on for Raspberry Pi is a tiny full color display for the Raspberry Pi, about the size of a postage stamp. As it is connected via the SPI bus its performance is very good.

This does require a bit of installation; it doesn't work out of the box, see Adafruit Mini PiTFT - 135x240 Color TFT Add-on for Raspberry Pi Guide

Installation#

Mini TFT Display

The link above is the canonical source, but here's a copy of the gist. You first update and upgrade the Pi:

sudo apt update -y
sudo apt-get update -y
sudo apt-get upgrade -y
Then shutdown with:
sudo shutdown -h now
Disconnect the power, attach the TFT display and re-apply power. Then:
cd ~
sudo pip3 install --upgrade adafruit-python-shell click
sudo apt-get install -y git
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
cd Raspberry-Pi-Installer-Scripts
sudo python3 adafruit-pitft.py --display=st7789_240x135 --rotation=270 --install-type=console
The last line provides configuration for the specific display. If you've installed the board with its printed text upright the orientation (rotation) will be 270°.

You can also run it as:

sudo python3 adafruit-pitft.py
to go through the interactive configuration.
Note the following section describes a possible solution if the display doesn't work.

Compatibility with Current Pi Kernels#

It turns out the current Python library support for the Adafruit PiTFT displays may not work with the 2021-era linux kernels. If you type

dpkg -l raspberrypi-kernel
and find the version (which is a date) is 2021 and you want to use one of these displays, if the display isn't working after installation, the solution is to "pin" the kernel version back to 1.20201126-1. This is described in the Adafruit Forum:

which is further described at:

...though I note that using the March 2021 beta version of the 64 bit Raspberry Pi OS the display worked without pinning the kernel, i.e., out of the box.

Fail to install tslib#

If during installation of the Pi TFT software you get a message stating it had failed to install tslib, here's a reference to a fix: https://www.impulseadventure.com/elec/rpi-install-tslib.html if you're willing to install tslib yourself. But it seems:

The issue is that tslib is not available anymore, it has been renamed libts0 (if I'm not wrong), so the provided python script is not working anymore.. I would have expected that Adafruit provide up-to-date installation instruction for the 3.5" touchscreen
...so the solution seems to be to modify the install script by substituting "libts0" for "tslib". That seems to work.

Pinout#

This plugs directly onto the GPIO bus but can be wired using jumper wires, as only a few of the pins are necessary:


Tags:  Hardware