ds18b20 #7429
Replies: 1 comment
-
Posted at 2021-02-20 by user125091 does anyone have any ideas how to fix this? Posted at 2021-02-20 by Robin Sat 2021.02.20 How many sensors are attempted to be traversed using the
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 > https://www.espruino.com/modules/DS18B20.js Function Does lengthening the interval in L14 reduce the number of ASSERT's? Posted at 2021-02-21 by user125091
About 8 sensors. I do not know enithing , i only use code from example Posted at 2021-02-21 by Robin Sun 2021.02.21
L3 of the first code block in post #1 does not match the three sections below heading 'Multiple sensors' as the 'sensors' array definition is missing. My inquiry was to see what errors occurred when using those three code blocks. ( me thinks none ) To prove this to yourself, add a > re: 'I do not know enithing' *(sic)* May I ask how many years of Javascript & coding experience you have so that we may provide other tutorials to assist. Posted at 2021-02-22 by user125091 I'em frontend developer, and I know JS pretty well. everything works, the sensors are detected. The problem is that in one example ASSERT is an error, in the second one runs out of memory.
this error also occurs if you call the ws.send("....") 15 times (by https://www.espruino.com/ws#websocket-server)
This dirty example helps, but not nice
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-02-19 by user125091
Any implementation works poorly, each approach has different problems
this example by https://www.espruino.com/DS18B20
After several seconds the error:
If sensors search put to set Interval this problem disappears , but other appears
This code fills all RAM in time and device stops working
Interval time increase does not have any influence, it only delays the time of crash
Beta Was this translation helpful? Give feedback.
All reactions