       //if you get here you have connected to the WiFi
       Serial.println("connected...yeey :)");
     }
-    digitalWrite(LED_BUILTIN, HIGH); // Turn led off as we are not in configuration mode.
     ESP.reset(); // This is a bit crude. For some unknown reason webserver can only be started once per boot up so resetting the device allows to go back into config mode again when it reboots.
     delay(5000);
   }

  if ((digitalRead(TRIGGER_PIN) == LOW) || (initialConfig)) {
    Serial.println("Configuration portal requested.");
     server.reset(new ESP8266WebServer(WiFi.localIP(), 80));
     
     digitalWrite(LED_BUILTIN, LOW); // turn the LED on by making the voltage LOW to tell us we are in configuration mode. Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wifiManager;

    //it starts an access point and goes into a blocking loop awaiting configuration

     }
}
void checkShedule(){
       //json format : {"1":{"hour":"10", "minute":"10", "portion":"2"}, "2":{"hour":"10", "minute":"10", "portion":"2"}} ...5
       StaticJsonBuffer<1000> jsonBuffer; 
       StaticJsonBuffer<200> jsonBufferNested;
       SPIFFS.begin();
