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

Helping hand to store locally

 

We have a requirement in line to read sensor data for few minutes and store it in a file/ in memory mechanism until it synchs with the companion App. The whole idea is to port the data as a collection to a remote server so it can be processed later. Can someone guide me to execute this, as I failed to pull off something productive

Best Answer
0 Votes
4 REPLIES 4

I've written a clockface that collects all stats (including HR) every 15 seconds and stores them in files on the watch, so it can be done.

 

What problem were you having?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hi Catplace..

Thanks for your reply...

As soon the file size reaches 25 KB, an out of memory error is thrown as the log shows we have reached the upper allowed limit 64 KB.

 

So please advise the ideal file format to store data and update file for a time period you mentioned..

 

Thanks a lot.. 

 

 

Best Answer
0 Votes

Two tricks I used:

 

Don't use the javascript type 'number'. They take typically eight bytes each. If you represent the values as Int16, you can get great savings in memory and speed.

 

Don't try to keep everything in memory at once. I wrote a small random-access file system that lets me cache and flush readings to file every minute or two. This was a LOT of work, and difficult to debug!

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thanks friend,

 

I will try in that way...

Best Answer
0 Votes