Skip to content

Advanced usage


To make sketches work as you intended with AutoConnect, make sure you understand the implications of the setting parameters and configure AutoConnect. AutoConnectConfig allows you to incorporate settings into AutoConnect that coordinate control over WiFi connectivity and captive portal behavior.
For advanced usages, the configuration settings and the Sketch examples are followings:

Don't forget AutoConnect::config

The configuration cannot be reflected by only changing the member variables of AutoConnectConfig settings. It will be reflected in the actual ones by AutoConnect::config function. Don't forget to run the AutoConnect::config after changing the AutoConnectConfig member variables.

AutoConnect portal;
AutoConnectConfig config;

void setup() {
  config.autoReconnect = true;
  portal.config(config);  // Don't forget.