 void loop() {
   // put your main code here, to run repeatedly:
   // myServer.handleClient();
-  delay(1000);
+  delay(200);
 }

    wfMan.startConfigPortal(ssid.c_str(), AP_PASSW);
  }

  // Connect to the AP if not connected by the WiFiManager
  WiFi.setAutoConnect(false);
  WiFi.setAutoReconnect(true);
  for (uint8_t count = 5; count > 0; count--) {

  File configFile = SPIFFS.open(CONFNAME, "w");
  if (configFile) {
        Serial.println("saveConfigCallback: opened config file for writing the config");
  } else {
        Serial.println("saveConfigCallback: cannot opent the config file for write");
        return;
  }
  Serial.println("saveConfigCallback: config file has been opened for savig the config and JSON buffer has been created successfully");
  StaticJsonBuffer<200> jsonBuffer;
  JsonObject& json = jsonBuffer.createObject();
  json["sta_ssid"] = stassid;
  json["sta_pass"] = stapass;
  json.printTo(configFile);
  Serial.println("saveConfigCallback: config save ok");
}

void configModeCallback(WiFiManager *myWfMan) {
