How many sensors are attempted to be traversed using the forEach?
'does anyone have any ideas how to fix this'
I do not have this hardware sensor. I do however note the following:
When L5 in the second code snippet was inserted inside the setInterval(), a connect object is being created once each second. Eventually memory runs out as has been discovered.
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.
Sat 2021.02.20
How many sensors are attempted to be traversed using the
forEach
?I do not have this hardware sensor. I do however note the following:
When L5 in the second code snippet was inserted inside the
setInterval()
, a connect object is being created once each second. Eventually memory runs out as has been discovered.From your link
beneath heading 'Multiple sensors' uses an array of exactly three connect objects to which the data reads are applied.
Has the code in that section been used verbatim and what were those results?
The module source is here, if that helps
Function
getTemp()
uses a callback which potentially could be null andsetTimeout()
function call.Does lengthening the interval in L14 reduce the number of ASSERT's?