Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Chris Carter
#23199 Mine currently hangs every time I put in a webserver request, and hangs in the standard loop roughly every 10 minutes? I'll do your troubleshooting steps tonight when I get home. Thanks!
User avatar
By Chris Carter
#23210 Ok, so what I *think* I'm learning is that it is the amount of pixels that are being driven. Everything seems ok if I try to drive only 5 pixels, but the crashing seems to start at as low as 30 pixels. Since I'm trying to drive 120 this is a problem for me.

Could it be because the nointerrupts() call is interfering with the ability of the chip to receive server data? I'm pretty new at this so I'm clutching at straws a little.
User avatar
By Chris Carter
#23211 Apologies for the spam comments, I'm kind of just commenting as I discover things. I've added a brief delay to the main loop (100ms) and it seems to be much more stable. I've changed colours about 5 times and it's not crashed (used to crash almost every colour update). I think that the main loop was spending so much time pointlessly updating the neopixels that it didn't have a chance to handle the server data. I'll keep looking at it to see if it remains stable.

edit: been working (with many compiles and uploads) for over an hour now. I think the delay has fixed it :)
User avatar
By Mario Mikočević
#23221
SwiCago wrote:Comment out the Neopixel code. This will help determine if it is the webserver library or neopixelbus library. If it still hangs, then you can try disabling webserver and reenable neopixel and make it do things randomly, watch the serial see if it hangs again. If it does, it could be something even lower level. In which case just use a simple loop that does nothing but print the time and delay 100ms..if that hangs, then it is at the core of arduino and a bug must be posted. I personally never test any of the ESPs for longer than 10minutes. But I have not heard of anyone else having issues with webserver, hence my hunch on neopixel.

Can either of you say how long it takes till it hangs?


Heya,

It does not hang, it just stops responding to http queries, loop() part works fine, I've added Serial.println("*barf*"); and that barfing does not stop over serial line ever. Even tried -
Code: Select allvoid loop() {
  if ( WiFi.status() == WL_CONNECTED ) {
    server.handleClient();
  } else {
    Serial.println("Disconnected");
    delay(2000);
  }
}

it never prints "Disconnected",
gonna try with removing NeoPixel stuff too ..

--
Mozz