Back to Explorer

XIAO-WEB-LED-CONTROLLER-AP

Project Information

Author

FlashESP

Board

XIAO_ESP32S3

SDK Version

3.3.2

Platform

ESP32

Created

Updated

Description

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.

Sorry, your browser doesn't support Web Serial.Web Serial requires HTTPS.

README

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 .ino sketch

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.