CPP: AP - lvidarte/esp8266 GitHub Wiki

https://raw.githubusercontent.com/lvidarte/esp8266/master/examples/ap/ap.png

Download the project

Checkout this PlatformIO project code here

Code

The relevant code to set the ESP8266 as access point is

#include <ESP8266WiFi.h>

const char *ssid = "ESP-AP";
const char *password = "12345678";

WiFi.softAP(ssid, password);

Go to http://192.168.4.1 in a web browser connected to this access point to see it

{
  hosts: [
    "192.168.4.3",
    "192.168.4.2",
    "192.168.4.4"
  ]
}