re 'again via setInterval I push the collected strings'
re 'Also, the device works for few hours and then stops sending data'
New interpreter error: CALLBACK,MEMORY
Hi @gdanov , what techniques are being used to check memory? There really isn't enough here to make a definitve response. The above however, leads me to believe that memory is being gobbled up. It is quite possible that a setInterval is buried inside a repetative loop, or something of the sort, from which then, Espruino is being blocked from perfofming the necessary garbage collection.
process.memory()been viewed to determine usage as time moves along? Please post before, during and after.
'but it looks like both setInterval handlers are cancelled?'
Is the trailing question mark indicating a guess here, was a check actually done?
If it hasn't been discovered yet, these commands entered into L-Hand WebIDE console will reveal the state of memory.
console.log(global["\xFF"].timers); //nice, less info trace(global["\xFF"].timers); //full info
As @MaBe pointed out in post #2 it'll be much easier to assist with the actual code. Please post.
so, I left it connected via tcp and this is what seems relevant:
I get some exceptions in the http put ("Uncaught InternalError: Unable to create socket" included) but it looks like both setInterval handlers are cancelled? the one reading temperature did not throw visible exceptions.