Boards / Common wiring

ESP32 + ILI9341 2.8" SPI

The classic breadboard combination: ESP32 DevKit, 2.8" ILI9341, XPT2046 resistive touch on the same SPI bus.

ESP32 + ILI9341 2.8" SPI: a 240 by 320 panel, drawn from the preset
Drawn from the preset - no vendor photograph of this board was published.

Building for it

A project is made for one toolchain, picked when you start it. All four can drive this board:

Toolchain
Arduino (C++)Every board, every widget and every peripheral here. The most control, and the most to set up. Start a project
MicroPythonChange a screen by editing a file on the board. No compiler once it is flashed. Start a project
ESPHomeNo compiler to install, and the panel can join Home Assistant as real entities. Start a project
ESP-IDF (C)Espressif's own framework: esp_lcd, the component registry and idf.py, with nothing of Arduino in it. Start a project

At a glance

PartDetail
MakerGeneric
MCUESP32 (WROOM / WROVER)
Xtensa LX6 dual-core @ 240 MHz, 520 KB SRAM (+ up to 8 MB PSRAM on WROVER)
DisplayIlitek ILI9341, 240 x 320 px, SPI (4-wire serial), 16-bit colour
TouchXPTek XPT2046 (resistive, SPI)
BacklightGPIO 21, dimmable (PWM)
Memory4 MB flash, no PSRAM (N4)
Graphics libraryTFT_eSPI

Display pins

ILI9341 on SPI (4-wire serial): SPI clock 40 MHz, host VSPI, BGR colour order, inversion off.

SignalPin
SCK / CLKGPIO 18
MOSI / SDAGPIO 23
MISO / SDOGPIO 19
CSGPIO 15
DC / RSGPIO 2
RESETGPIO 4
BacklightGPIO 21

Touch pins

XPT2046: 2500 kHz, shares the display bus.

SignalPin
SCKGPIO 18
MOSIGPIO 23
MISOGPIO 19
CSGPIO 5
IRQ / PENIRQGPIO 27

Check your revision. Wiring template rather than a fixed board - adjust to match how you actually wired it.

Designing for it in LCD Wizard

The parts

ILI9341. The most common hobby TFT. 2.2"-2.8" modules, usually with an XPT2046 resistive panel.

XPT2046. The classic 4-wire resistive controller. Needs calibration. Can share the display SPI bus with its own CS.

ESP32 (WROOM / WROVER). No native RGB parallel peripheral - use SPI or an 8/16-bit i80 bus.

TFT_eSPI. Fastest for SPI panels on ESP32. Configured via User_Setup.h build defines.

The pinout on one page

Every pin above, laid out to print and keep beside the bench. Generated from this preset, so it says exactly what the designer writes into lcd_pins.h.

Download the pinout (PNG)Open it as SVG

The same pins as data - board.json and pins.csv - are in the open pinout dataset on GitHub, free to reuse under CC BY 4.0.

Designs for this board

Clone any of them into the designer, or see every design for this board in the gallery.

ESP32-2432S028R "Cheap Yellow Display"2.8" 240x320 ILI9341 with XPT2046 resistive touch on a second SPI bus. The cheapest way into LVGL.ESP32 · ILI9341 320 x 240 · XPT2046 touch
ESP32-2432S028 "Cheap Yellow Display", two USB ports, ILI9341The CYD with a micro-USB and a USB-C port, in its ILI9341 batch: 2.8" 240x320 ILI9341 with XPT2046 resistive touch on a second SPI bus. Same pins as the original CYD.ESP32 · ILI9341 240 x 320 · XPT2046 touch
ESP32-2432S028C (capacitive CYD)Capacitive variant of the Cheap Yellow Display: same ILI9341, CST820 touch over I2C.ESP32 · ILI9341 320 x 240 · CST820 touch
ESP32-S3 + ILI9341 SPIESP32-S3 DevKitC wired to a 2.8" ILI9341 with XPT2046 touch.ESP32-S3 · ILI9341 240 x 320 · XPT2046 touch
STM32F407 + ILI9341 SPIBlack pill / Discovery style wiring using SPI1 and an XPT2046 touch panel.STM32F4 · ILI9341 240 x 320 · XPT2046 touch
Raspberry Pi Pico + ILI9341SPI0 driving a 2.8" ILI9341 with XPT2046 touch.RP2040 · ILI9341 240 x 320 · XPT2046 touch

Next