can someone provide me an algorithm or approach to detect if a person is walking around or lying in bed? I do not want to use the interrupts.
The sensor will be placed in a trouser pocket.
I start the acceleration measurement every 10 seconds and send the values to a Raspberry Pi. On the RaspberryPi i want to calculate in a Python script, if a person is lying in bed or walking around.
Go to Solution.
You still can use the interrupt feature but do NOT map it to physical interrupt pin and enable the pin out.
Then you can use your host MCU to polling the interrupt status register.
You can use step detect and no motion interrupt to achieve your target.