I would like to implement this into an app that records a minute as "moderate intensity" if more than 100 steps were performed or records it as a "vigorous intensity" if more than 130 steps were performed.
So far, I simply used
require("health").readAllRecordsSince()
to get all health records of the last week to filter out the records with an appropriate step count (see code snippet below). However, BangleJS only saves step counts per 10 minutes (probably to save storage). This is understandable but gives more inaccurate results here:
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.
The WHO recommends to "perform at least 150 minutes of moderate intensity aerobic physical activity throughout the week or do at least 75 minutes of vigorous intensity aerobic physical activity throughout the week".
I would like to implement this into an app that records a minute as "moderate intensity" if more than 100 steps were performed or records it as a "vigorous intensity" if more than 130 steps were performed.
So far, I simply used
to get all health records of the last week to filter out the records with an appropriate step count (see code snippet below). However, BangleJS only saves step counts per 10 minutes (probably to save storage). This is understandable but gives more inaccurate results here:
How can I get the exact step count of the last minute only, to avoid averaging/guessing the step count like above?