Chat freely about anything...

User avatar
By btidey
#91050 Don't use such long delays with ESP8266.

If you only want to trigger things every 30 seconds then use say a 1 second delay and a counter
Code: Select allint delayCounter = 0;
void loop() {
  if(delayCounter >= 30) {
    delayCounter = 0;
User avatar
By eriksl
#91051 Don't even do that, a delay of 1 second is still way too long and it doesn't help if you don't let the SDK code run in the meantime.

The proper way to do this is to add a timer (software, alarm) for the amount of time to wait and in the meantime return (to the SDK code). This is already for quite short delays, avoid any delay > 100 ms, but shorter is better anyway.