HI @Gordon, might have found the issue. I was just refactoring the code a but, throwing out the useless vref value, etc. and then noticed that it was running really nicely when connected to my mac, debugging to the web ide.
When I prepared the espruino for running off the usb power supply, I would typically do
debug=false to turn off all debug statements and then
Now, I cannot understand why, but when I keep the debug statements (console.log) turned on, it works. It not running for hours how, but it seems to fix something.
I've uploaded the latest code - I have only a few console.log in there. Could it be that one has to "consume" or touch the data variables, e.g. response data at least once so it is freeing memory or not blocking? That's happening when debugging in my code is on for example.
If you have time, please take another look - I am now trying to understand why it works if console.log turned on :-)
© Espruino, powered by microcosm.
Report a problem