Most likely there has been a change in the the ESP8266 core or one of the libraries you are using that is causing excessive delays in the code, hence the resets. You might need to experiment with disabling bits of the code until you can work out what part is causing the holdup, or start littering your code with yield(); in order to let the ESP8266 do whatever housekeeping it needs to do and prevent lockups.
pfeerick, thanks for your reply, Unfortunately this didn’t work,
i’ve tried uploading my code using an older laptop that hasn’t yet updated PIO, and everything is working pretty good.
i just can’t figure out what the problem is…
Well, going back to an older version of PIO (and hence the ESP8266 core) suggests it is a change in the core or a library.
Try one of the following versions of the esp8266 platform in your platformio.ini: platform = espressif8266@2.1.1 #ESP8266 Core v2.5.1 platform = espressif8266@2.0.4 #ESP8266 Core v2.5.0 platform = espressif8266@1.8.0 #ESP8266 Core v2.4.2
If you get to 1.8.0 and it still isn’t working, unless you think you were running a really old version of the esp8266 core, it’s probably a library update.
I’ve been trying the library scenario since yesterday, the problem it’s a big project, commenting functions and figuring out which library has the issue.
thanks for that platform.ino trick, i didn’t know i can do this before
If you get to thinking it’s a library update, you can do the same thing for libraries… @version in the lib_deps reference for it… that’s the real beauty of platformio… you can lock in specific versions of platforms and libraries for you projects, or even have two different environments in the same project… the ‘stable’ version locked one, and the ‘bleeding edge latest and greatest’ … etc.
i’ve figured out where the problem is
it’s in the interrupt code section, but i’m pretty sure it has no problem
the whole exact code is working fine using the older laptop…
just commenting those lines solved the restarting issue…
but ruined all my code as it depends on interrupts