I think the best way to do it is with a "state machine" so it need to have a memory of the previous state to switch states and it need to be able to turn on some sensors for a bit.
For example if the state is unknown it could turn on the HRM sensor for a bit to get a new value and then compute a new useful state.
I am not sure if all this is possible within the module only or if an app is needed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think the best way to do it is with a "state machine" so it need to have a memory of the previous state to switch states and it need to be able to turn on some sensors for a bit.
For example if the state is unknown it could turn on the HRM sensor for a bit to get a new value and then compute a new useful state.
I am not sure if all this is possible within the module only or if an app is needed.