ESP32 & ESP8266 Connectivity · Intermediate · Config portal

ESP8266 Config Portal

The same idea on the cheapest board that can do it: an ESP8266 that configures itself from a browser.

Firmware status: Generated from this project's own pin map and compiled with arduino-cli for esp8266:esp8266:nodemcuv2 before publication; bench validation on your hardware is still required.

Board: ESP8266 (NodeMCU v3 / Wemos D1 mini) · ESP8266EX @ 80 MHz · 3.3 V logic · build for esp8266:esp8266:nodemcuv2.

What you will build

An ESP8266 that hosts its own setup page, stores network credentials, and reports its address once connected.

Components

  • ESP8266 board (NodeMCU v3 or Wemos D1 mini)
  • USB data cable
  • Push button
  • LED and a 220 Ω resistor

Pin map for this build

Sketch constantPinWhat it is
PIN_STATUS_LED5Status LED — with 220 Ω series resistor
PIN_BUTTON12Push button — to GND, internal pull-up

Tools

  • USB programming cable
  • Multimeter
  • Current-limited bench supply (for anything that switches a load)
  • Small screwdriver and wire cutters

Build sequence

  1. Flash with WIFI_SSID empty. The board opens an access point named for the project.
  2. Join it, complete the form, and wait for the reboot message.
  3. Read the assigned address in the serial monitor and open it.
  4. Hold the button to clear the stored network if a password was mistyped.

Test and expected result

Portal appears on first boot, the board connects with the entered credentials, and the status page loads over the network.

Acceptance checks

form saves, station mode connects, status page reports rssi and uptime

Safety and limits

Only A0 is analog and it accepts 3.3 V — do not feed it 5 V. The board draws up to 300 mA briefly on transmit.

Hardware scope

ESP8266 access point plus station, DNS catch-all, credentials persisted by the core.

Connection diagram

Connection diagram for ESP8266 Config Portal

Download the connection diagram (SVG)

Download the Arduino sketch (E02_esp8266_config_portal.ino)

Guide source: the sketch on this page was generated from the pin map above and compiled for esp8266:esp8266:nodemcuv2 before publication.

Related projects

Back to all project guides · Study the course