Skip to content
DisplayMITv2.5.43

TFT_eSPI

by Bodmer

TFT_eSPI is a high-performance display driver optimized for SPI TFT panels (ILI9341, ST7789, ST7735, and more), using direct hardware SPI register access instead of the Arduino SPI library's generic transfer calls to hit much higher frame rates than a standard GFX-based driver — especially valuable on ESP32/ESP8266 where it can drive full-color 320x240 displays smoothly. The catch that trips people up, and the single most common setup mistake, is that pin configuration is NOT done in your sketch — it lives in a separate `User_Setup.h` file inside the library folder itself, which must be edited to match your wiring (CS, DC, RST, MOSI, SCK pins) before anything will display correctly. Skipping this step is the number one cause of "blank screen" reports for this library.

Installation

Arduino IDE — Library Manager

Sketch → Include Library → Manage Libraries → search TFT_eSPI

PlatformIO

lib_deps = bodmer/TFT_eSPI

Supported boards

Arduino UnoESP32STM32 Blue Pill

Examples

Draw text on a TFT display

Requires User_Setup.h in the library folder to be edited for your exact pin wiring first.

#include <TFT_eSPI.h>

TFT_eSPI tft = TFT_eSPI();

void setup() {
  tft.init();
  tft.setRotation(1);
  tft.fillScreen(TFT_BLACK);
  tft.setTextColor(TFT_WHITE);
  tft.setCursor(10, 10, 2);
  tft.println("SolderHub");
}

void loop() {}