XIAO-WEB-LED-CONTROLLER-AP
Project Information
A Wi-Fi access point with automatic redirection and a live-updating web UI that controls the onboard LED.
Flash to Device
Login required: You need to login or create an account to flash this project.
Source Files (2)
Download AllREADME
Overview
This project creates an open Wi-Fi AP using the XIAO ESP32S3 and provides a web interface that allows users to turn the onboard LED ON or OFF.
The interface automatically opens due to captive portal DNS routing and shows the LED state live via a /state JSON endpoint.
Features:
- Open Wi-Fi AP with captive portal auto-redirect
- Web UI for turning LED ON/OFF
- Live LED state indicator using AJAX polling
- Minimal network traffic for responsive updates
- Fully contained in a single
.inosketch
Hardware
- Board: Seeed Studio XIAO ESP32S3
- Onboard LED: GPIO 21, active LOW
No other components are needed.
Wi-Fi Access Pointt
SSID: XIAO-AP-WEBLED Password: (none) Address: 192.168.4.1
All DNS queries are mapped to ESP32 → captive portal behavior.
Web Interface
The interface provides:
- Current LED state (live)
- ON button
- OFF button
JavaScript polls the /state endpoint every 500 ms:
{ "led": "OFF" }When a button is clicked, the browser sends:
/on
/off
The LED updates instantly.
How to Use
Upload the sketch.
Connect to AP: XIAO-AP-WEBLED.
The browser should open the controller page automatically.
Click Turn LED ON / Turn LED OFF.
Watch the live indicator update instantly.