diff --git a/LibreMetric.ino b/LibreMetric.ino index c042ef3..34ed0fe 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -45,6 +45,9 @@ String message, webpage; ESP8266WebServer server(PORT); Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); +void configModeCallback (WiFiManager *myWiFiManager) { // AP config mode + display_static_message("Setup"); +} void setup() { Serial.begin(115200); // initialize serial communications @@ -62,10 +65,14 @@ void setup() { display_static_message("Wi-Fi"); WiFiManager wifiManager; + // reset saved settings + // wifiManager.resetSettings(); + #ifndef DEBUG_WifiM wifiManager.setDebugOutput(false); // no debug #endif wifiManager.setTimeout(180); + wifiManager.setAPCallback(configModeCallback); if(!wifiManager.autoConnect("LibreMetric")) { DEBUG_PRINTLN(F("failed to connect and timeout occurred")); display_static_message("No OK");