

The Adafruit 2.2in PiTFT HAT (Part ID: 2315) is a compact touchscreen display designed specifically for Raspberry Pi boards. It features a 2.2-inch diagonal screen with a resolution of 320x240 pixels (QVGA), making it ideal for creating portable projects, graphical user interfaces, and interactive displays. The PiTFT HAT integrates seamlessly with Raspberry Pi GPIO pins and includes a resistive touchscreen for user input.








Below are the key technical details of the Adafruit 2.2in PiTFT HAT:
| Specification | Details |
|---|---|
| Screen Size | 2.2 inches (diagonal) |
| Resolution | 320x240 pixels (QVGA) |
| Touchscreen Type | Resistive touchscreen |
| Interface | SPI (Serial Peripheral Interface) |
| Backlight Control | GPIO-controlled |
| Power Supply Voltage | 3.3V (via Raspberry Pi GPIO) |
| Dimensions | 65mm x 56mm x 6mm |
| Weight | ~20g |
The PiTFT HAT connects directly to the Raspberry Pi GPIO header. Below is the pin configuration:
| Pin | GPIO Pin | Function |
|---|---|---|
| 1 | 3.3V | Power supply |
| 6 | GND | Ground |
| 19 | GPIO10 (MOSI) | SPI data input |
| 21 | GPIO9 (MISO) | SPI data output |
| 23 | GPIO11 (SCLK) | SPI clock |
| 24 | GPIO8 (CE0) | SPI chip select |
| 18 | GPIO24 | Backlight control |
| 22 | GPIO25 | Touchscreen interrupt |
Hardware Setup:
Software Setup:
sudo apt-get update
sudo apt-get install -y python3-pip
sudo pip3 install adafruit-blinka adafruit-circuitpython-ili9341
sudo raspi-config
Display Test:
import board
import digitalio
from adafruit_ili9341 import ILI9341
import displayio
# Initialize SPI interface
spi = board.SPI() # Uses GPIO10 (MOSI), GPIO11 (SCLK), GPIO8 (CE0)
tft_cs = digitalio.DigitalInOut(board.CE0) # Chip select
tft_dc = digitalio.DigitalInOut(board.D25) # Data/command
tft_reset = digitalio.DigitalInOut(board.D24) # Reset
# Create the display object
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs,
reset=tft_reset)
display = ILI9341(display_bus, width=320, height=240)
# Fill the screen with a solid color
splash = displayio.Group()
display.show(splash)
color_bitmap = displayio.Bitmap(320, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000 # Red
bg_sprite = displayio.TileGrid(color_bitmap, pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)
while True:
pass # Keeps the display running
The display is not turning on:
Touchscreen is unresponsive:
Display shows a blank screen:
Backlight is not working:
Q: Can I use this display with Arduino boards?
A: The Adafruit 2.2in PiTFT HAT is designed for Raspberry Pi and uses the GPIO header. While it may be possible to adapt it for Arduino using SPI, it is not officially supported.
Q: Does the PiTFT HAT support multitouch?
A: No, the resistive touchscreen supports single-touch input only.
Q: Can I use this display in portrait mode?
A: Yes, the display orientation can be configured in software to support portrait or landscape modes.
Q: Is the display sunlight-readable?
A: The display is not optimized for outdoor use and may be difficult to read in direct sunlight.