LCDWIKI 4.0" ESP32-S3 (ES3C40P)
4.0" 320x480 IPS ST7796S over SPI with FT6336U capacitive touch, an ES8311 codec with microphone and speaker output, a WS2812 LED, a 4-bit SD slot and battery charging.

As an Amazon Associate, LCD Wizard earns from qualifying purchases.
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 |
| MicroPython | Change a screen by editing a file on the board. No compiler once it is flashed. Start a project |
| ESPHome | No 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
| Part | Detail |
|---|---|
| Maker | LCDWIKI |
| MCU | ESP32-S3 Xtensa LX7 dual-core @ 240 MHz, 512 KB SRAM (+ 2-16 MB PSRAM on most modules) |
| Display | Sitronix ST7796 / ST7796S, 320 x 480 px, SPI (4-wire serial), 16-bit colour |
| Touch | FocalTech FT6236 / FT6336U (capacitive, I2C) |
| Backlight | GPIO 45, dimmable (PWM) |
| Memory | 16 MB flash, 8 MB octal PSRAM (N16R8) |
| Graphics library | GFX Library for Arduino |
Display pins
ST7796 / ST7796S on SPI (4-wire serial): SPI clock 80 MHz, host SPI2_HOST, BGR colour order, inversion on.
| Signal | Pin |
|---|---|
| SCK / CLK | GPIO 12 |
| MOSI / SDA | GPIO 11 |
| MISO / SDO | GPIO 13 |
| CS | GPIO 10 |
| DC / RS | GPIO 46 |
| RESET | not connected |
| Backlight | GPIO 45 |
Touch pins
FT6236 / FT6336U: I2C address 0x38, 400 kHz, shares the display bus.
| Signal | Pin |
|---|---|
| SDA | GPIO 16 |
| SCL | GPIO 15 |
| INT / IRQ | GPIO 17 |
| RESET | GPIO 18 |
Also on the board
- I2C (GPIO 16 / 15, IIC header) - SDA GPIO 16, SCL GPIO 15
- SDCard - SD card, CLK GPIO 38, CMD GPIO 40, D0 GPIO 39, D1 GPIO 41, D2 GPIO 48, D3 GPIO 47
- RgbLed - NeoPixel string, DATA GPIO 42
- Battery - analog input on GPIO 9
- Boot Button - input on GPIO 0
The preset adds these to the Hardware tab with the board, so a sensor can go straight onto the connector.
Check your revision. Run on a board (2026-10-22): the picture, touch (FT6336U at 0x38), the ES8311 answering at 0x18 and the 4-bit SD card (it mounted and read a 128 GB card) were seen working. Not reported yet: sound from the speaker, the microphone, the RGB LED and the battery reading. Pins are from LCDWIKI's page, Arduino demo instructions and schematic (their demo source is not published). The panel is set as LCDWIKI's ST7796_Init.txt has it - inversion on, BGR - with its power, VCOM and gamma sent as Panel tuning (the first build without them looked a little washed out); if colours come out negative turn Invert off, if red and blue are swapped change the colour order. The SPI clock is 80 MHz, sent to GFX Library for Arduino (which otherwise starts at 40 MHz); if the picture is noisy or garbled, set the SPI clock back to 40 MHz. Its reset is the board's RESET button, not a GPIO; DC (46) and the backlight (45) are strapping pins used as outputs once running. Touch, the ES8311 and the IIC header share I2C on GPIO 16/15. The speaker amplifier is enabled by pulling GPIO1 low; sound goes out on GPIO8 and the microphone comes in on GPIO6 (the page's I2S_DO/I2S_DI names are the other way round to the schematic) - switch it on under Hardware > Audio. Battery: two 100K resistors halve the cell on GPIO9. For smoother screen changes raise the draw buffer in Project settings (120 lines, double buffered, in PSRAM). Left free on the expansion header: GPIO 2, 3, 14 and 21, and UART0 on 43/44. USB-C goes straight to the S3, so the serial log needs USB CDC On Boot (the export sets it).
Designing for it in LCD Wizard
- Choose LCDWIKI 4.0" ESP32-S3 (ES3C40P) on the Hardware tab (or use the button above) and every pin on this page is filled in. The export writes the sketch,
lcd_pins.h, the GFX Library for Arduino configuration,lv_conf.handplatformio.ini- a project that builds for this board as it comes. - The FT6236 / FT6336U is capacitive and needs no calibration. The firmware resets it and checks it answers on every boot.
- The backlight is dimmable: give a slider or a button a Set backlight action.
- With PSRAM the LVGL memory pool can live there, leaving internal RAM for everything else.
- Screens are designed for 320 x 480 px in either orientation, with LVGL 9 or LVGL 8.
The parts
ST7796 / ST7796S. The usual 4.0" 320x480 controller. Faster than ILI9488 over SPI (true RGB565).
FT6236 / FT6336U. Register-compatible with the FT6206. Very common on 2.8"-3.5" capacitive TFTs.
ESP32-S3. The only common Arduino target with a hardware RGB565 LCD peripheral. PSRAM is effectively required for RGB panels.
GFX Library for Arduino. Moshi Liu's library. Best QSPI/AMOLED and RGB coverage. Configured in code.
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.
From the people who made it
The board’s own documentation. Pinouts on vendor pages do sometimes disagree with the hardware in front of you - where this page and that one differ, trust your board and tell us.
- Vendor documentation
- Schematic (PDF)
- ES3C40P user manual (PDF)
- Arduino demo instructions (PDF)
- FT6336U touch controller datasheet (PDF)
Designs for this board
Clone any of them into the designer, or see every design for this board in the gallery.
Similar boards
Next
- Quick start - from an empty screen to firmware on the board
- Boards and displays - presets, controllers, pins and touch in the designer
- Flashing and configuration - PlatformIO, the Arduino IDE and first-boot checks
- Troubleshooting - a white screen, mirrored image or touch that misses