Avatar for Gordon


Member since Sep 2013 • Last active Jan 2022

Most recent activity

  • in Bangle.js
    Avatar for Gordon

    Are all your apps up to date? That usually happens when the bootloader is seriously out of date.

    Once you're sure they are all updated you can run load('bootupdate.js') in the IDE just in case to force an updatre of the .boot0 file that is giving you that error

  • in Electronics
    Avatar for Gordon

    It might be that it just needs a pulse? so digitalPulse(A0,1,100) for a 100ms pulse on A0.

    It's possible that if you leave it powered all the time that's not good for it?

    That page says the impedance is 550 ohms, so 3.3*1000/550 = 6mA when driven from the Espruino's 3.3v - so from that side of things you're ok.

    However if it's inductive it might be trying to put some extra voltage into Espruino when turned on/off and it might be an idea to put some 'clamp' diodes across it. I don't suppose you have an oscilloscope you could check with?

  • in Bangle.js
    Avatar for Gordon

    @HughB thanks - I'll give it a good try here and make sure it still works on a real walk with the new settings.

    Any idea why the test harness wouldn't be perfect though? It should be exactly the same code running with the exact same data.

  • in Bangle.js
    Avatar for Gordon

    Argh, ok - thanks - it seems I've run out of credits for Travis again. I'll try and get it topped up.

    ... might end up ditching it and just build on my server. Won't be as fast but at least it won't keep breaking or running out of credit :)

  • in Bangle.js
    Avatar for Gordon

    Ok, I'm just pushing changes to change the step count threshold from 14-> 18.

    My reasoning:

    In the step-count repo, we were applying an equal relevance to the steps from all files. IMO if there's a long walk with 10000 steps and you detect 1% less steps, that's less of a big deal than detecting 100 steps over a period where you shouldn't be detecting any steps at all.

    When I readjusted things a little to give more weight to @HughB's work/housework/driving and
    @MrPloppy's code, the best threshold went from 14->18. It means:

    • Normal walking activities, 97% accurate -> 93%
    • Driving: roughly 30% of the amount of steps recorded
    • Working: roughly 50% of the amount of steps recorded
    • Housework/general: roughly 50% of the amount of steps recorded

    So there is a difference in step counting during walking (relative to other step counting devices), but I think as far as day to day wearing of the device goes, this should be a massive improvement to accuracy.

  • in Bangle.js
    Avatar for Gordon

    Ok, thanks... I'll bump the threshold up to 15 for now, which should help as you say.

    I'm not convinced with a calibration step. I'm not sure it's as easy as placing it on a table, and I'm not aware of any other device that asks for the accelerometer to be calibrated. I doubt many people would be happy doing that.

    The old approach was way off though

    As a complete system, yes. However there are plenty of different ways of doing peak detection and the current way is definitely not the most robust.

    Hopefully someone can jump in and try some more options out though. @jeffmer that link looks really neat - took me a while to see I had to click on the graphs though :)

    It's possible that something like that code would work fine for us. We originally had a bandpass filter which cut out the DC element completely, but that meant there was ringing, which caused other issues :)

    That blog's got some other great-looking articles too:


  • in Bangle.js
    Avatar for Gordon

    but there is another one as well, it fires at 1.5-2 sec in, and it issues an E.reboot() and the screen displays "loading".

    Yes, that one should be adjustable with a firmware tweak.

    I was looking at swipe event, it only has left/right.

    You can see how stuff is handled in touchHandlerInternal: https://github.com/espruino/Espruino/blo­b/master/libs/banglejs/jswrap_bangle.c#L­1475

    I believe everything is forwarded as events

  • in Bangle.js
    Avatar for Gordon

    If you've got the fork running locally you can run npm test and it'll check everything for you.

    OR if you submit a PR you'll get a travis check done on the PR (a green tick or red cross) and if you click through on that it'll tell you exactly what the issue was