As part of the Bangle.js 2 launch I intend to make health tracking more of a first-class part of Bangle.js.
We'll have a health app which will store health data every 10 minutes, all day, every day for the last year - it'll also draw graphs and stuff.
I'm planning on storing: steps, heart rate (if enabled) and movement (for sleep tracking). Is there anything else? GPS traces/etc can be stored separately.
I'm adding movement tracking inside the firmware, but it does raise a question about how to do it in the most friendly way. We've had a longstanding issue that the step counter is 'steps since Bangle.js started' and apps like pedometers have to do their own work to calculate steps per day.
While I can add Bangle.setSteps/etc functions so steps can be reset at the beginning of the day, when you're also measuring steps for the logging and maybe also an exercise session you don't want the step count randomly reset in the middle. You also don't want to lose health info if you change apps.
So I'm thinking of adding a health event once per minute, that updates with health stats (eg steps, movement) over that minute (and the ability to query health stats for what has happened during the minute). That way apps can hook onto that event and nothing is treading on anything else's toes.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As part of the Bangle.js 2 launch I intend to make health tracking more of a first-class part of Bangle.js.
We'll have a
health
app which will store health data every 10 minutes, all day, every day for the last year - it'll also draw graphs and stuff.I'm planning on storing: steps, heart rate (if enabled) and movement (for sleep tracking). Is there anything else? GPS traces/etc can be stored separately.
I'm adding movement tracking inside the firmware, but it does raise a question about how to do it in the most friendly way. We've had a longstanding issue that the step counter is 'steps since Bangle.js started' and apps like pedometers have to do their own work to calculate steps per day.
While I can add
Bangle.setSteps/etc
functions so steps can be reset at the beginning of the day, when you're also measuring steps for the logging and maybe also an exercise session you don't want the step count randomly reset in the middle. You also don't want to lose health info if you change apps.So I'm thinking of adding a
health
event once per minute, that updates with health stats (eg steps, movement) over that minute (and the ability to query health stats for what has happened during the minute). That way apps can hook onto that event and nothing is treading on anything else's toes.Any thoughts? Does that sound sensible?