Back to Explorer

esp32-wifi-example

Project Information

Author

Mikrobot.pl

Board

ESP32 Dev Module

SDK Version

3.3.2

Platform

ESP32

Created

Updated

Description

Control an on-board LED via WiFi with a captive portal

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

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:

#define LED_PIN 2