How to switch between movement and position detection using LIS3DH accelerometer?
Hi, I have a LIS3DH accelerometer which I have set up to detect movement by generating interrupt by setting the INT1_CFG register. I also want to detect the orientation of the accelerometer but I do not want both at the same time ( It would be great if I could detect both). I want to alternate between the settings so that when I go to sleep I turn on movement detection with interrupt enabled and when I wake up I want to disable the movement detection and check the orientation. When I switch from movement to position, the readings are all random and movement detection is still enabled. So far, I have not had any luck in doing both besides power cycling the accelerometer and manually changing the settings for each, which is not feasible in my case. I would appreciate any help regarding this.
Thank you.
