Setting up the Raspberry Pi is easy. Since the PiTFT comes preassembled, all you need to do is place it onto the GPIO pins.

Since there are dozens of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, please visit the guide for CircuitPython on Linux to see whether your platform is supported

Connect the display as shown below to your Raspberry Pi.

Additional Parts

If you don't already have a 3.5mm cable, you'll want to grab one of those:

This basic cable comes with two 3.5mm (1/8" headphone jack size) stereo connectors. It's fairly straight forward, you'll commonly need these to connect two audio devices...
$2.95
In Stock

If you are using a Raspberry Pi 4 and have some active cooling on it such as the Pimoroni Fan Shim or Heatsink Case, you may want to attach a 40-pin stacking header so that the pins on the PiTFT don't interfere:

Stack multiple plates, breakouts etc onto your Raspberry Pi Model B+ with this custom-made extra-tall and extra-long 2x20 female header. The female header part has extra spaces to...
$2.95
In Stock
Note this is not a kernel driver that will let you have the console appear on the TFT. However, this is handy when you can't install an fbtft driver, and want to use the TFT purely from 'user Python' code!

Software Setup

You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling SPI on your platform and verifying you are running Python 3. Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready!

If you have already installed the kernel module, you will need to remove it by running the installer and choosing uninstall.

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 additional speed. This can be installed with the following command:

  • sudo apt-get install python3-numpy

Install the PyPortal Library

You'll next want to install the Blinka PyPortal library. Installing this library will also install all of the dependencies, so it's really easy to setup. Just run the following command:

pip3 install adafruit-blinka-pyportal

Using a 3.5" PiTFT

If you want to use a 3.5" PiTFT, then you will need to do a little extra work. First, you'll need to install the HX8357 library. You can do that by using the following comand:

pip3 install adafruit-circuitpython-hx8357

Next you'll need to initialize the display at the beginning of the example and pass it into the initializer. We'll go over that on the Running Examples page.

If you are using the 3.5" PiTFT, keep in mind that the display's resolution is higher than what examples were written for, so things may appear a little off.

Connecting More Sensors

Most of the PiTFT hats either have a 40-pin or a 26-pin connector on the back that allows you to connect more sensors. We also conveniently have both 40-pin and 26-pin versions of the Pi cobbler that will connect to the back of the panel so that you can hook up more sensors.

This is the assembled version of the Pi T-Cobbler Plus.  It only works with the Raspberry Pi Model Zero, A+, B+, Pi 2, Pi 3 & Pi 4! (Any Pi with 2x20...
$7.95
In Stock
Now that you've finally got your hands on a Raspberry Pi® , you're probably itching to make some fun embedded computer projects...
$6.95
In Stock

This guide was first published on Jul 09, 2020. It was last updated on Jul 09, 2020.

This page (Raspberry Pi Setup) was last updated on Oct 22, 2021.

Text editor powered by tinymce.