API Reference / PersWiFiManager::onAp

Attach a handler function that runs every time AP mode is started

Signatures

Args

Notes

This will run the handler function every time AP mode is started, when WiFi fails to connect or AP mode is manually triggered.

For successful connection handler, see onConnect

Example Code

void setup(){
	...

	//uses a lambda function as the argument
	persWM.onAp([]() {
		//this code runs every time AP mode is started
		DEBUG_PRINT("AP MODE");
		DEBUG_PRINT(persWM.getApSsid());
	});