TFT_eSPI is an Arduino and PlatformIO compatible graphics library built for 32-bit microcontrollers. Optimized for ESP32, ESP8266, Raspberry Pi Pico (RP2040), and STM32, it delivers rendering performance 3–10× faster than generic Arduino libraries — with built-in support for SPI, 8-bit parallel, DMA transfers, smooth fonts, touch input, and off-screen sprites.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Marcussacapuces91/doc-TFT_eSPI/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install TFT_eSPI via Arduino Library Manager or PlatformIO and get your display wired up.
Configuration
Configure your display driver, SPI pins, and interface type in User_Setup.h.
Your First Sketch
Draw shapes, text, and images in a working Hello World sketch within minutes.
API Reference
Browse the full TFT_eSPI class API: drawing, filling, text, color, and viewport methods.
What TFT_eSPI Can Do
Shapes & Graphics
Pixels, lines, rectangles, circles, ellipses, triangles, arcs, and rounded shapes.
Text & Fonts
Eight built-in bitmap fonts, GFX free fonts, and smooth (anti-aliased) font rendering.
Anti-Aliased Drawing
Smooth lines, wide lines, wedge lines, smooth circles, arcs, and spots.
Sprites
Off-screen TFT_eSprite buffers for flicker-free animation and compositing.
Touch Input
Built-in XPT2046 touch controller support for resistive touchscreens.
DMA Transfers
Non-blocking pixel pushes on RP2040, ESP32, and STM32 for maximum throughput.
Supported Platforms
TFT_eSPI provides optimized drivers for these processor families:| Processor | 4-wire SPI | 8-bit Parallel | 16-bit Parallel | DMA |
|---|---|---|---|---|
| RP2040 (Raspberry Pi Pico) | ✓ | ✓ | ✓ | ✓ |
| ESP32 / ESP32-S3 | ✓ | ✓ | — | ✓ (SPI) |
| ESP32-C3 / ESP32-S2 | ✓ | — | — | — |
| ESP8266 | ✓ | — | — | — |
| STM32Fxxx | ✓ | ✓ | — | ✓ (SPI) |
| Other 32-bit (Teensy, etc.) | ✓ | — | — | — |
Quick Start
Install the library
Open the Arduino IDE Library Manager, search for TFT_eSPI, and click Install. PlatformIO users add
bodmer/TFT_eSPI to lib_deps in platformio.ini.Configure your hardware
Edit
User_Setup.h (or select a pre-built User_Setup_Select.h entry) to set your display driver, SPI pins, and screen dimensions.Initialize the display
Create a
TFT_eSPI instance, call tft.begin() in setup(), then use setRotation() to orient the display.The screen controller, interface pins, and library settings must be defined inside the library’s configuration files — they cannot be set in your Arduino sketch. See the Configuration guide for details.