I am using this library to run a simple webserver, with the ESP32 as AP
https://github.com/espressif/arduino-es ... Server.ino
Everything works fine, if there's only server.handleClient(); in the loop and nothing else.
But the problem is that i need to run another function in the loop that takes a about 150ms to complete.
So something like this:
Code: Select all
loop()
{
server.handleClient();
test();
}
void test()
{
digitalWrite(13, HIGH);
delay(5);
digitalWrite(13, LOW);
delay(150);
digitalWrite(13, HIGH);
}
Basically, sometimes the page loads and sometimes it does not.
So how can I make the server.handleClient() work properly with that delay?