Public Sub deepsleep(ms As ULong)
Log ( "dormindo....")
RunNative("deepSleep", ms * 1000)
End Sub
#if C
void deepSleep(B4R::Object* o) {
ESP.deepSleep(o->toULong());
}
#end if
I put a Button to Pin_ESP.D2 pull-up. If you restart with that pin pressed the software enter in a Server mode. And the led is blinking ( NODEMCU ), after 10 seconds we can press again the button and it should be in sleepmode but it restart end send a solicitation to a server and then goes to sleep mode.
Another question when the wifi connection fails it keep trying to connect and I need that it cames back so I can try another SSID
In this case it is the hardware watchdog that caused a reset.
The hardware watchdog fires after 8 seconds. I'm not sure whether it can be disabled or not. Try to sleep for 7 seconds and see whether you get this error.