readme.md
Markdown · 32 lines
# ESP32 LED Captive Portal
### Control an on-board LED via WiFi with a captive portal
This project turns an **ESP32 Dev Board** into a small WiFi-controlled LED module.
When powered, the ESP32 creates an **open WiFi Access Point** and a **captive portal**.
As soon as a device connects to the AP, a configuration page appears that lets you **turn the LED ON or OFF**.
---
## ⭐ Features
- **Open WiFi Access Point** (no password)
- SSID: `ESP32-LED`
- **Captive portal**
- Any URL request (e.g. `google.com`) is redirected to the LED control page
- Works with Android / iOS / Windows / Linux
- **Web-based LED control**
- Simple buttons: **Turn ON** / **Turn OFF**
- Live status display
- No external network or internet required
---
## 📦 Hardware requirements
- **ESP32 Dev Board** (e.g. ESP32-DevKitC)
- On-board LED or external LED connected to a GPIO pin
Default LED pin in the code:
```cpp
#define LED_PIN 2