You might be able to solve this easily enough by setting a flag for when you are doing HTTP access and on the timer side. What seems to happen is that during a page request a timer is called and then you get this error.
What I found solved it was if you set a flag like:
function pageRequest(res, req) {
servingPage=true;
// all your code
servingPage=false;
}
and then after in your setInterval function
setInterval(function() {
if (servingPage) return;
// your code here
},milliseconds)
Then this generally resolves the problem.
For some reason the timers for Espruino in the ESP32 port are very fussy and what I've learned is refactoring your code to use as few as possible really makes your app run more smoothly.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You might be able to solve this easily enough by setting a flag for when you are doing HTTP access and on the timer side. What seems to happen is that during a page request a timer is called and then you get this error.
What I found solved it was if you set a flag like:
and then after in your setInterval function
Then this generally resolves the problem.
For some reason the timers for Espruino in the ESP32 port are very fussy and what I've learned is refactoring your code to use as few as possible really makes your app run more smoothly.
G