Help with reading data from csv in BangleJs2 #5971
Replies: 1 comment
-
Posted at 2023-06-06 by rigrig
This only reads chunk 1 of the Storage file, see here for an explanation about those. You probably want something like this:
Also:
Shouldn't this be Posted at 2023-06-06 by user155657 Thank you very much. Also Posted at 2023-06-06 by @gfwilliams Looks like @rigrig's got you sorted. Just some notes though:
So maybe more like:
Posted at 2023-06-06 by user155657 Thanks @gfwilliams Thanks again Posted at 2023-06-06 by user155657 Thank you very much. Posted at 2023-06-08 by @gfwilliams
That'll be ok but it wouldn't give exactly 10Hz since you're sampling only when the delay is 100ms or more - but the HRM by default runs at 25Hz, so you might get steadier readings by just averaging two readings. It'd give you 12.5Hz but it'd be better to stay at that than to drop samples and get 10ish Hz. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-06-06 by user155657
Hello,
I am a student who is to new JS and recently got my hands on to bangleJS2. As part of our student project we are planning to acquire motion and heartrate data from bangleJS2.
The goal of the following code is to save outputs of accelerometer, magnetometer and heartrate sensor into a csv file. Due to storage limitation we are stopping it to record data when Flash is less than 0.75MB.
We want to record at least two days worth of data.
When we are trying to call the data we are only retrieving only 550 rows of data, even though the csv is having more data, we aren't able to get more values
We are using the following code in our script to read data
Is there a way to read all the rows from the csv file to array and send using ''Bluetooth.print''?
Apologies for my clumsy code.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions