Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access Full Storage

ANSWERED

Hello together,

As a student I've got to make an IT-Project - Analyzing the sleep of a person (I know that FitBit provides sleep-analyzis out of the box, but for the project I need to extract Data and use my own algorithm).
Therefore I bought an Versa2 and developed an app that logs HeartRate and Accelerometer every second. I write each block of data into an ASCII-file and send it in an defined interval to my companion.

Due to the short interval of one second, a lot of Data is collected (which is mandatory for the project! I know that this results in huge Files and needs a lot of Power... But instruction is instruction 🙂 ) and leads to an FatalError because of the Storage being full. This happens after approximately 3:30min, so I send the file every three minutes to my companion to avoid crashing the app. As conclusion, I need to carry my phone everywhere or else I don't have all the Data.

 

The big question, which has been asked elsewhere too: Can I access the 8GB of storage of the Versa2 for the app and write my file there?

Since I use it for research purpose, I don't need that storage anyway and the access would allow me to send the file once a day by pressing a button.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I don't think you'll be able to access any more storage space on the watch. However, you can store data more efficiently than ASCII. An easy option is CBOR. Better would be an ArrayBuffer, with the data forced into the minimum sized integers that your research would permit (and I wouldn't worry about losing some precision because there's some inaccuracy in the readings anyway).

 

I doubt you'll be able to stretch it to 24 hours, though.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
4 REPLIES 4

I don't think you'll be able to access any more storage space on the watch. However, you can store data more efficiently than ASCII. An easy option is CBOR. Better would be an ArrayBuffer, with the data forced into the minimum sized integers that your research would permit (and I wouldn't worry about losing some precision because there's some inaccuracy in the readings anyway).

 

I doubt you'll be able to stretch it to 24 hours, though.

Peter McLennan
Gondwana Software
Best Answer

You can use the file system (fs) and write the files to the watches memory outside the JavaScript limited memory. 

 

I think I would store them as cbor files, every minute, then transfer them to the phone app, deleting the watch files as soon as there is acknowledgement of receipt.

 

Also, you can batch record heart rate data 

 

There is also a file transfer API that can automate much of the file moving for you.

 

Regards,

Reign

Best Answer

I'm very sorry I forgot to reply on this topic.

First of all: Thanks for this impulse.

Unfortunately yes: even with my further research I'm only capable of using this small storage.

The more efficient way with the CBOR file sounds interesting. I've already modified my program so that I can work with an ArrayBuffer and code/decode the file. By doing so, I've ran into lot of errors and my best result are decoded strings "F" (it should represent Timestamp, HeartRate and x,y,z-values).
Nevertheless, I'm not unsatisfied with this idea and will try my best to get it work!

If I need further assistance, I'll open a new thread concerning CBOR files

 

Best Answer
0 Votes

You can read and write files on your Fitbit using the FS API. This should help you. 🙂

 

 

 

If this answer works please mark this post as a Best Answer.  ~ K.K Designs

Best Answer
0 Votes