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 constant | Pin | What it is |
|---|---|---|
PIN_STATUS_LED | 5 | Status LED — with 220 Ω series resistor |
PIN_BUTTON | 12 | Push 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
- Flash with WIFI_SSID empty. The board opens an access point named for the project.
- Join it, complete the form, and wait for the reboot message.
- Read the assigned address in the serial monitor and open it.
- 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
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
- ESP32 Captive Portal Wi-Fi Manager — Boot the ESP32 with no credentials and configure its network from a phone, with the portal saved to flash.
- ESP8266 Sensor Portal Logger — A battery-minded sensor node you configure in the field, with the reading shown on its own setup page.
- ESP32 Web Relay Controller — Two relays and a page that switches them, served by the board itself with no cloud in the middle.