You are reading a single comment by @Robin and its replies. Click here to read the full conversation.
  • does anyone have any ideas how to fix this?

  • Sat 2021.02.20

    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.

    From your link

    https://www.espruino.com/DS18B20

    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

    https://www.espruino.com/modules/DS18B20­.js

    Function getTemp() uses a callback which potentially could be null and setTimeout() function call.

    Does lengthening the interval in L14 reduce the number of ASSERT's?

  • How many sensors are attempted to be traversed using the forEach?

    About 8 sensors.

    I do not know enithing , i only use code from example

About

Avatar for Robin @Robin started