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 Pin | ESP32 GPIO | Bus Signal | Description |
|---|---|---|---|
| VCC | 3.3V / 5V | Power | Display logic and LED power supply |
| GND | GND | Power | Common Ground |
| CS | GPIO 15 | SPI CS | TFT LCD Chip Select (Active Low) |
| RESET | GPIO 4 / EN | Control | Hardware Reset Pin |
| DC / RS | GPIO 2 | Control | Data / Command Register Select |
| MOSI / SDI | GPIO 23 | VSPI MOSI | Master Out Slave In Data Line |
| SCK / CLK | GPIO 18 | VSPI SCK | High-Speed SPI Clock (40MHz) |
| LED / BL | 3.3V / GPIO 21 | Backlight | Backlight anode (PWM controllable) |
| MISO / SDO | GPIO 19 | VSPI MISO | Master In Slave Out (Read pixels/status) |
| T_CLK | GPIO 18 | VSPI SCK | Shared SPI Clock with Display |
| T_CS | GPIO 21 | SPI CS | Touch Controller Chip Select |
| T_DIN | GPIO 23 | VSPI MOSI | Shared Touch SPI Data Input |
| T_DO | GPIO 19 | VSPI MISO | Shared Touch SPI Data Output |
| T_IRQ | GPIO 22 / N.C. | Interrupt | Touch 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:
| Peripheral | GPIO Pin | Configuration Notes |
|---|---|---|
| TFT CS / DC / RST | GPIO 15 / GPIO 2 / N.C. | Hardware wired to ILI9341 controller |
| TFT SPI (SCK / MOSI / MISO) | GPIO 14 / GPIO 13 / GPIO 12 | HSPI bus configuration |
| TFT Backlight (BL) | GPIO 21 | Active HIGH / PWM dimming capable |
| Touch (T_CS / T_IRQ) | GPIO 33 / GPIO 36 | XPT2046 resistive touch controller |
| Touch SPI (CLK / MOSI / MISO) | GPIO 25 / GPIO 32 / GPIO 39 | Dedicated software SPI touch bus |
| RGB Status LED | Red: GPIO 4, Green: GPIO 16, Blue: GPIO 17 | Active LOW RGB indicator |
| LDR Light Sensor | GPIO 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:
| Component | GPIO Pin | Specifications |
|---|---|---|
| ST7789V2 LCD (135x240) | MOSI: 35, SCK: 36, CS: 37, DC: 34, RST: 33, BL: 38 | SPI DMA / 1.14" IPS display |
| Keyboard Matrix | Rows: 8, 9, 11 | Cols: 13, 15, 3, 4, 5, 6, 7 | 56-key physical QWERTY matrix |
| I2S Audio (NS4168 Amp) | BCLK: 41, WS / LRC: 43, DATA: 42 | Digital I2S mono 1W speaker |
| MicroSD Slot | CS: 12, MOSI: 14, CLK: 40, MISO: 39 | FAT32 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