-
-
Hi @Gordon - apologies been out of contact for a few days. Yes - using v209.9 step code and the activepedom widget with the thresholds set to 5 steps in 5 seconds. This seems the most accurate I have seen so far. Just want to check that doing this was / is a valid test case - what do you think ? To be clear I have not written any code. I am assuming that what comes out of the v2.09.9 firmware is the step count code and the ActivePedom is effectively acting as a second filter, this may not be the case though. Thats the tests that I have done. I think it might be enough to go down to 3 steps in 3 seconds and still be enough to get rid of miscounting of slight movement when moving arms, wrist twisting when sat still etc.
-
-
I installed your code to try and undertand how this works. I can see the ringing effect that you point out. As per my post above I think all that is a needed is a two filter approach. This existing filter in your code that detects potential steps. The 2nd filtering stage ensures that 5 steps in 5 seconds are detected before counting them as step events. The step count will always be 5 seconds behind but I think that is ok. I have noticed (external observations as a user only) that FitBits and AmizFit Bips both appear to have a threshold before they will start registering steps. From a pure technical perspective that might not be the best theoretical approach but it appears to be working from a pragmatic point of view. Worth a try and get some feedback from others maybe ?
-
@Gordon - Good news with firmware 2v09.9, and step counting.
I did a test walk this morning 1.53 miles
AmizFit Bip: 3057 steps
Bangle: 3068 stepsI did a similar walk yesterday and got very close results but did not write them down before midnight. I appreciate that 1 test result does not make strong evidence - on the other hand I have been routinely testing the step counter widgets (with different settings) across multiple walks since I purchased my Bangle in December 2020. I have never managed to get within 400 steps of the AmizFit bip - so to be within 11 steps is a brilliant result.
I have been using the ActivePedom Widget with the following settings:
Step Threshold 5: Active Res (ms) 5000. In other words only register steps after 5 steps in 5 seconds. All other settings in ActivePedom left as default.
I think if you produced a firmware with this additional threshold built in you would have a pretty accurate step counter. I'd be happy to do some real world testing.
-
-
-
you actually could just include it with Inline C though, so you could tweak it quickly on real >hardware without recompiling. If there's interest I could paste up an example of how to do that?
Sounds like a great option. I think having to recompile the firmware might put a few off.
If you can write up the basic process loop of what you do to iterate round the process. I could have a go. I've done a lot of C in the past but nothing todo with filters or machine learning etc. I still have a few more enhancements and bug fixes to do to 'kitchen combo' though.
Is there a way to simulate this in javascript first, run on the bangle and then translate it to C ?
-
the 'new' Bangle.js (the SMA Q3)
This sounds interesting, tell me more. I was wondering if there would be a another smartwatch hardware that would run Espurino. I will google it. I would love something like the form factor of the AmizFit Bip if that were possible. It has some advantages. The charging connector is not magnetic and interferes less with compass calibration. Its smaller. Battery life is very good. Having said that I curently have that test Bangle you sent me not needing a recharge after 300+ hours.
Found this.
https://hackaday.io/project/175577-hackable-nrf52840-smart-watch
Looks really cool. When are these going on sale in the Bangle Shop, can you place advance orders. Only snag for me is that is another GPS data sheet to grapple with. Nice looking watch though.
-
I use the manual sort order option in the App Manager to set the order in which my Apps present in the launchers. The problem is that new Apps have 0 set as the sort order by default. I have to confess I dont like that much myself but I can see that some might like it as it makes the new App immediately visible. Maybe new Apps should have a sort order of 99 by default so that they would go on the end of the launcher list. Maybe the default value for a new App could be one of the Settings in the Settings app, IE newApps get sort order 0 or 99 ?
-
Is it actually better than the old step counter? If not, I might as well revert it.
Gut feel, I think it is improved, but still quite a way off being able to say we have reliable step counter. I was going to give a good test on a known 1.03mile route I have previously used many times to test step counters - but when I saw I was logging 1000s of steps sat at a desk I thought it would be better to see if that got sorted first. I may try it with the activepedom as well, assuming it is still compatible with that widget. ActivePedom has the X steps in X seconds feature which effectively takes out any counting when sat still.
Is that something you normally do? I don't really see how I'm supposed to filter this
out if it's at a rate that's the same as walking?No. Apologies - maybe that sample was not that great an idea. Maybe I should have done it just 3 times in 30 seconds.
I could be wrong but I think if you did this to most step counters, they would count steps as well.
I have an AmizFit Bip and an old FitBit and neither count steps on reaching across a desk or rotating a wrist, maybe the odd time but not consistantly to the point that by the end of the day when my AmizFit would say 1200 steps and the bangle says 8000+ today.
I can't really afford to spend too long on this
Yeah - I understand, this will be one of many things wanting attention.
Maybe its time to have a competition to see if anyone can get a better version. I might have a go myself if its not to hard a jump to get into. I had a quick look at the link. What is the lifcycle of trying to improve this ? EG - do you just add samples until you get better figures at the end or would the C need to be adjusted etc ? How would one actually test this for real on a Bangle ? Is there a way to patch the firmware or would you have to build your own firmware from the source etc and then use the DFU loader etc. I think real world testing is needed here - I know all too well how time consuming that is from walking outside waiting for a GPS fix etc.
Having a good enough step counter is an essential base level feature of any smartwatch though. I would rather Bangle became my default smartwatch than have to wear a second one to get an accurate step count etc.
Maybe float the idea of a competion and see if there is much enthiusiasm for it ?
-
-
-
@Gordon - appreciate its not going to be perfect (2% error over 1 km would be excellent, 5% would be good.). But its definitely still counting 1000s of steps over the course of a day when steps are not there. Today I have apparantly done 3671 steps but all I have done is been up and down stairs maybe 4 times and the rest of the time sat at a desk. I would expect maybe 250 or 300 steps max for such activity.
Its quite easy to reproduce the issue. Just sit look at the watch then twist your wrist through 90 degrees and back varying the speed at which you turn the wrist. The twist used to turn the LCD on should not cause steps.
Will send you another accel log of me doing this, maybe another tuning session will get this to be filtered out.
-
-
Hi @Gordon - I have updated to 2v09.9 and I am still experiencing counting steps (2-10) when twist wrist to look at the watch whilst stationary. Just want to check I have the version that has your latest checkin.
-
Here's the kind of thing I have started doing so I can turn an event driven interface into a polling interface.
***************************************************************************** Heart Rate Monitor ******************************************************************************/ function HRM() { this.bpm = 0; this.confidence = 0; } HRM.prototype.log_debug = function(o) { console.log(o); } HRM.prototype.toggleHRMPower = function() { this.log_debug("HRM.toggleHRMPower()"); if (!Bangle.isHRMOn) return; // old firmware if (!Bangle.isHRMOn()) { this.log_debug("HRM.toggleHRMPower(powerOn)"); Bangle.removeListener('HRM', onHRM); Bangle.setHRMPower(1); Bangle.on('HRM', onHRM); } else { this.log_debug("HRM.toggleHRMPower(powerOff)"); Bangle.removeListener('HRM', onHRM); Bangle.setHRMPower(0); } // poke the hrt widget indicator to change if (WIDGETS.widhrt !== undefined) { WIDGETS.widhrt.draw(); } } HRM.prototype.getBpm = function() { return this.bpm; } HRM.prototype.getConfidence = function() { return this.getConfidence; } HRM.prototype.onHRM = function(hrm) { this.bpm = hrm.bpm; this.confidence = hrm.confidence; this.log_debug("onHRM:(bpm)" + this.bpm); this.log_debug("onHRM:(conf) " + this.confidence); } let hrmObj = new HRM(); function onHRM(hrm) { hrmObj.onHRM(hrm); }
-
-
-
-
I am wondering if there is a way to retrieve the heart bpm and confidence values by polling rather than using a listenner. In a multiclock format - the problem for me is variables being out of scope when the listenner gets called. I can do it with a listenner (as I have done with GPS fixes that I wanted to share between two multiclock watch faces) but it would be much simpler if I could just do
`
let bpm = HRM.getBpm(); let confidence = HRM.getConfidence();
-
-
-
Great news ! I'll grab the latest build of 2.09. Is there a release note for whats in 2.09, looks like I missed the announcement. I'll give this a go over the weekend. I too sit at a desk all day typing, but do walk the dog. I might try wearing my Amizfit Bip on the same arm and compare. If its within 2% of a Fitbit or Amizfit Bip it will be good enough as far as I am concerned.
I'm developing on a chromebook (runs linux and debian buster in a container). The chromebook has a bluetooth interface built in. I run Ubuntu and Elementary OS on my Desktop but I dont want to sit at a Desk after work finishes.