Add message on LEDs when entering setup mode

master
JbLb 8 years ago
parent 793404e72d
commit 150281b970

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

Loading…
Cancel
Save