How save average and standard deviation of data stream everyone minute in the csv #5216
Replies: 1 comment
-
Posted at 2022-09-22 by @thyttan
Posted at 2022-09-23 by @gfwilliams @thyttan I'm not sure I understand? Is this a Bangle.js 1 or 2? I think the issue is you're storing large amounts of data in RAM with your Right now it seems you have 100 samples, but for each sample you store 13 bits of data (which can sometimes require up to 26 vars) - you can be using 2600 vars. Normally it wouldn't be a huge deal as Bangle.js 2 has 12000 in total, but for the v1 it could cause problems. There is some info at https://www.espruino.com/Performance#array-buffers-are-the-most-efficient-way-to-store-data about how to store in an arraybuffer. You can use a DataView to store different types of data in one big array: https://www.espruino.com/Reference#l_DataView_DataView But... if you used a Typed array for each data entry (eg a.x/a.y/etc) then you can use built-in methods like Posted at 2022-09-23 by @thyttan I only tried to joke regarding the file name @user149667 used in the example code. But it was somewhat ruined by the video being embedded rather than just being linked to 🙃 Posted at 2022-09-23 by user149667 Thank you very much @gfwilliams Posted at 2022-09-23 by user149667 Lol I just realised hehe. Posted at 2022-09-26 by @gfwilliams @thyttan ahh! That makes a lot more sense now :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-09-22 by user149667
New to both Bangle and JavaScript.
I am currently trying to save all the HRM, accelerometer and magnetometer output's individual average and standard deviation once in minute. The code below is giving me Interpreter error: LOW_MEMORY.
Please help.
Beta Was this translation helpful? Give feedback.
All reactions