If it might have occured also to you to get a "Soft WDT Reset" error in an ESP8266 project then here is why this had happened and how to correct it:
ESP8266 runs several background tasks that check the state of the integrated circuit (f.e. maintain WiFi connection and other stuff) and has two watchdogs one software based and one hardware based that want to give priority to the state checking. For more information please check this URL:
In order to avoid triggering the WDT errors you will need to interrupt slightly (and repeatedly in each loop) long running procedures either with a Delay(1) command or with the yield() function.
I have not found this function in the B4R available commands so I created an InLine function that can be called this way:
ESP8266 runs several background tasks that check the state of the integrated circuit (f.e. maintain WiFi connection and other stuff) and has two watchdogs one software based and one hardware based that want to give priority to the state checking. For more information please check this URL:
In order to avoid triggering the WDT errors you will need to interrupt slightly (and repeatedly in each loop) long running procedures either with a Delay(1) command or with the yield() function.
I have not found this function in the B4R available commands so I created an InLine function that can be called this way:
yield() function in B4R:
RunNative("yld", Null)
#if C
void yld(B4R::Object* o){
yield();
}
#End If