Should Bangle.getStepCount() reset to zero at the start of each day? #6983
Replies: 1 comment
-
Posted at 2021-12-30 by PeerDavid Hi, not sure if this helps you or if this is what you are searching for, but I'm using the health module, which is preinstalled on each bangle js 2 as far as I know. Using the code below works fine for me - also steps are set to zero each day :) In case health is not installed, I return 0. Probably ot would be better, to show a warning etc. instead ;) Attachments: Posted at 2021-12-30 by RickyP Thanks, I've made the changes to my code but get an error "module health not found" even after I've loaded the health tracking widget. Thanks. Posted at 2021-12-30 by PeerDavid Ok interesting... and the Health tracking app is installed? I think this app provides this functionality... Posted at 2021-12-30 by RickyP Yes, a health tracking app is installed and I can see the number of steps as a graph. Attachments: Posted at 2021-12-30 by HughB I would recommend this as the best way to get the daily step count into a clock. I would not recommend getting it from the health app as it might take a day before you get a count for a whole day.
Yes, the daily step count should reset each day at midnight, both in the health app and the pedometer widget. Posted at 2021-12-30 by PeerDavid For me the health app version works fine, steps are shown in realtime and I dont have to wait for a day :) Posted at 2021-12-31 by RickyP Thanks for your help and the code example, I've now got the basics working. function getSteps() { g.clear(); // Clear the screen once, at startup // Load widgets //Set background //Draw text string Posted at 2024-08-16 by user158752 me too any solution for" module health not found" Posted at 2024-08-27 by @gfwilliams
However I'd suggest just using |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-12-30 by RickyP
Hello everyone,
2 questions
I've written my own clock face and added a daily step count to the screen by using Bangle.getStepCount() but this just seems to just keep incrementing and not resetting to zero at the start of each day.
Should it reset to zero?
I've loaded the Pedometer widget, which does seem to reset but any suggestions on how I might use that step count on the screen rather than as a widget?
Beta Was this translation helpful? Give feedback.
All reactions