-->
Page 1 of 1

Restart Nodemcu When Stucked Connection

PostPosted: Mon Feb 20, 2017 6:43 am
by cotr
Hello, I am making WiFi controllable relay. I am using one of this version http://nodemcu.com/images/thumbnail/zms ... 0x1200.jpg

I am not use NodeMCU as server because my connection has changing ip. I am using NodeMCU as client and every two seconds NodeMCU makes get request to my server for checking "should I change relay status?". But sometimes NodeMCU get stucked. The blue led on it always lighting. When I restart it, it works again as expected. For this reason I should detect stuck and restart when it happens. How can I do that? Or do you advise another method?

Re: Restart Nodemcu When Stucked Connection

PostPosted: Fri Feb 24, 2017 12:40 pm
by jeffas
I suggest that you try first to find out where/why it is getting stuck. There is probably a bug in your sketch; maybe a memory leak, or some logical error that gets it stuck in an infinite loop. Can you run it with serial monitor attached? Add Serial.println calls to track where it gets to.