OpenSprinkler Forums OpenSprinkler Unified Firmware ESP32 port of 2.1.9 firmware Reply To: ESP32 port of 2.1.9 firmware

#75973

Ray
Keymaster

@v1pr, you said “Logically this should not work on the original esp8266 either…” — I don’t understand what this is referring to. Did you mean some line of code should have appeared before some other line of code? If i had to take a guess: note that creating ESP8266WebServer merely creates the object, it doesn’t do anything yet and certainly does not require having WiFi ready at that point. Same with creating the OpenThingsFramework object. The WiFi AP started at this line of code:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/main.cpp#L463
The otf->loop() function does the house keeping of responding to WiFi web requests. AP needs to be started before that, which is the case with the code.