# esp32-ILI9341

> ESP32 creates an open Wi-Fi Access Point (no password) with a captive portal. From the portal you can set a text that is displayed centered on a 2.8" ILI9341 TFT (320×240). In the background a Matrix-style falling characters animation runs continuously with more visible black space and random column activity.

- Author: Mikrobot.pl
- Platform: ESP32
- Board: ESP32 Dev Module (`esp32:esp32:esp32`)
- SDK version: 3.3.6
- Tags: #esp32, #captive-portal, #spi, #ili9341, #matrix, #tft
- Created: 2026-02-15
- Updated: 2026-02-15
- Favorites: 2, forks: 1
- Project page (view, flash from the browser, fork): https://flashesp.com/explore/QCrPkxLFFY4klz7DrB19Y
- Download all sources (zip): https://flashesp.com/api/public-projects/QCrPkxLFFY4klz7DrB19Y/download-sources/

## Source files

- [libraries_lock.json (536 B)](https://flashesp.com/explore/QCrPkxLFFY4klz7DrB19Y/files/1vrBsdLlHgDYEmJCnyzNm.md)
- [main.ino (5.0 KB)](https://flashesp.com/explore/QCrPkxLFFY4klz7DrB19Y/files/rGOk4rgO7KnwgkIekSOy9.md)
- readme.md (2.0 KB)

## README

# ESP32 ILI9341 Matrix Captive Portal Display

![Example usage](https://i.imgur.com/s9C9I20.png "Example usage")

## Short description
ESP32 creates an **open Wi-Fi Access Point (no password)** with a **captive portal**.  
From the portal you can set a text that is displayed **centered** on a 2.8" ILI9341 TFT (320×240).  
In the background a **Matrix-style falling characters** animation runs continuously with more visible black space and random column activity.

---

## Wiring (ESP32 ↔ ILI9341 SPI 2.8" 320×240)
> This setup uses ESP32 **VSPI** hardware pins (recommended).

| ILI9341 / TFT pin | ESP32 pin | Notes |
|---|---:|---|
| **VCC** | **3.3V** | TFT logic power |
| **GND** | **GND** | Ground |
| **CS** | **GPIO 5** | Chip Select |
| **DC** | **GPIO 2** | Data/Command |
| **RESET / RST** | **GPIO 4** | Reset (can be tied to ESP32 EN, but GPIO recommended) |
| **SCK / CLK** | **GPIO 18** | SPI clock (VSPI SCK) |
| **MOSI / SDA** | **GPIO 23** | SPI MOSI (VSPI MOSI) |
| **MISO / SDO** | **GPIO 19** | SPI MISO (VSPI MISO) |
| **LED / BL** | **VIN (5V)** | Backlight power (as requested) |

### Notes
- Ensure your TFT module supports **3.3V logic** on SPI lines (most ILI9341 SPI modules do).
- LED/BL to VIN (5V) is common, but if your module has no current limiting, consider powering BL from 3.3V or through a resistor/transistor.
- If you also use microSD on the same module, it shares SPI lines; you’ll need a separate **SD_CS** pin (not used in this project).

---

## Required libraries
Install these via Arduino Library Manager:
- **Adafruit GFX Library**
- **Adafruit ILI9341**

ESP32 core built-ins (no extra install):
- WiFi
- WebServer
- DNSServer

---

## How to use
1. Flash the firmware to ESP32 using **FlashESP**.
2. Power up ESP32 + TFT.
3. Connect your phone/PC to Wi-Fi network: **ESP32_Display** (open network).
4. Captive portal should open automatically (if not, open any site or go to `http://192.168.4.1`).
5. Enter a text and press **Display**.
6. The text appears centered while Matrix background continues.

Default text on boot: **mikrobot.pl**
