• Maybe implementing calculations, averaging, sensor fusion or whatever else is needed for the state changes is best done in a library. Then build an app or widget around that library which is able to keep state all the time and handles persisting on reloads etc..
    Some months ago I had implemented a version of the van Hees method for detecting inactivitiy by checking changes in the direction of accelerometer values. Maybe you can use that or parts of it. https://github.com/halemmerich/BangleApp­s/blob/libvanhees/apps/libvanhees/lib.js­

About

Avatar for halemmerich @halemmerich started