From 150281b970d4c8ba73b09b1d0af8e582bba391f4 Mon Sep 17 00:00:00 2001 From: JbLb Date: Thu, 21 Dec 2017 16:56:51 +0100 Subject: [PATCH] Add message on LEDs when entering setup mode --- LibreMetric.ino | 7 +++++++ 1 file changed, 7 insertions(+) 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");