KRYONOS
Hardware

Hardware & Display Wiring

Pinout schematics and connection guide for ESP32 and ILI9341 2.8" SPI touch screen.

KryonOS is pre-configured to drive 2.8" ILI9341 SPI displays with XPT2046 resistive touch controllers, as well as integrated devices like the Cheap Yellow Display (CYD), M5Stack Cardputer, and LilyGO T-HMI.


ESP32 DevKit + ILI9341 2.8" SPI Pinout

Connect the display headers to your standard ESP32-WROOM-32 development board using the hardware VSPI bus:

ILI9341 PinESP32 GPIOBus SignalDescription
VCC3.3V / 5VPowerDisplay logic and LED power supply
GNDGNDPowerCommon Ground
CSGPIO 15SPI CSTFT LCD Chip Select (Active Low)
RESETGPIO 4 / ENControlHardware Reset Pin
DC / RSGPIO 2ControlData / Command Register Select
MOSI / SDIGPIO 23VSPI MOSIMaster Out Slave In Data Line
SCK / CLKGPIO 18VSPI SCKHigh-Speed SPI Clock (40MHz)
LED / BL3.3V / GPIO 21BacklightBacklight anode (PWM controllable)
MISO / SDOGPIO 19VSPI MISOMaster In Slave Out (Read pixels/status)
T_CLKGPIO 18VSPI SCKShared SPI Clock with Display
T_CSGPIO 21SPI CSTouch Controller Chip Select
T_DINGPIO 23VSPI MOSIShared Touch SPI Data Input
T_DOGPIO 19VSPI MISOShared Touch SPI Data Output
T_IRQGPIO 22 / N.C.InterruptTouch Pen Down Interrupt (Optional)

Power Supply Requirement

Ensure your USB power source provides at least 500mA continuous current. Wi-Fi packet transmission spikes combined with LCD backlights can trigger brownout resets on sub-par cables.


CYD (ESP32-2432S028R) Internal Pinout

The "Cheap Yellow Display" integrates the ESP32 and 2.8" LCD on a single PCB. No external wiring is required:

PeripheralGPIO PinConfiguration Notes
TFT CS / DC / RSTGPIO 15 / GPIO 2 / N.C.Hardware wired to ILI9341 controller
TFT SPI (SCK / MOSI / MISO)GPIO 14 / GPIO 13 / GPIO 12HSPI bus configuration
TFT Backlight (BL)GPIO 21Active HIGH / PWM dimming capable
Touch (T_CS / T_IRQ)GPIO 33 / GPIO 36XPT2046 resistive touch controller
Touch SPI (CLK / MOSI / MISO)GPIO 25 / GPIO 32 / GPIO 39Dedicated software SPI touch bus
RGB Status LEDRed: GPIO 4, Green: GPIO 16, Blue: GPIO 17Active LOW RGB indicator
LDR Light SensorGPIO 34 (ADC1)Analog ambient light sensing

M5Stack Cardputer v1.1 Pinout

The M5Stack Cardputer features an ESP32-S3 microcontroller with built-in keyboard and ST7789 display:

ComponentGPIO PinSpecifications
ST7789V2 LCD (135x240)MOSI: 35, SCK: 36, CS: 37, DC: 34, RST: 33, BL: 38SPI DMA / 1.14" IPS display
Keyboard MatrixRows: 8, 9, 11 | Cols: 13, 15, 3, 4, 5, 6, 756-key physical QWERTY matrix
I2S Audio (NS4168 Amp)BCLK: 41, WS / LRC: 43, DATA: 42Digital I2S mono 1W speaker
MicroSD SlotCS: 12, MOSI: 14, CLK: 40, MISO: 39FAT32 script storage

TFT_eSPI User_Setup.h Reference

When building from source with the Arduino TFT_eSPI library for standard ESP32 DevKit:

#define USER_SETUP_LOADED
#define ILI9341_DRIVER
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS   15
#define TFT_DC    2
#define TFT_RST   4

#define TOUCH_CS 21

#define SPI_FREQUENCY       40000000 // 40MHz High-Speed SPI
#define SPI_TOUCH_FREQUENCY  2500000 // 2.5MHz Touch Controller SPI

On this page