• The function seems to be behaving normally now, I changed a couple of things so it might have been something simple. Basically if you look at how I'm handling the HRM event I'm not sure if the way I'm calling the turn_off function is ideal and if there should be any process to wait for the hrm.raw data to be read in.

    Polling the data more often might be overkill but if you're able to create a different Event seperate from the HRM one or add that option I'd be interested to test it out at double the sample rate at 100Hz maybe and see if there's much of a difference - not done anything around HRV before so worth trying different approaches.

    Regardless the sample rate you'd always need to do some level of processing, and I don't think just a rolling average to smooth it out is enough because if you do too much of that you end up blurring the signal. So it's finding a compromise between doing a little bit of basic noise cancellation and then also a more intelligent interpolation between each point to define the peaks. The margins of error on HRV are quite narrow also, it's a very sensitive metric so slight errors in calculating peak gaps at 50Hz makes quite a significant difference to the reading you get.

    I've submitted a pull request to the app loader. Next update will be to add a simple log function so you can record and maybe plot relative changes over time.

About

Avatar for BenJabituya @BenJabituya started