How to effectively recognize movement?

Hi,
I would like to control GPS module based on movement of whole device. At this moment I am getting X Y and Z axis of device and I am comparing it with previous values. But when the device is laid on the table, the values from accelerometer are still changing. I tried to round the values to one decimal number, but it is still not so reliable.

Is there any other possibility how to check if device is moving instead of comparing XYZ axes? Or is it possible to get these vales less precise? (when the device is laid on the table, the values will be still same…)

Thank you very much!
Milan

Hello Milan,

it is possible to set tresholds and interrupt on the accelerometer. Could this help you?

My GPS Module should arrive in a few days, then I’ll be able to help you and respond faster to your issues.

Martin

Hi Martin,
I will try something based on your examples. I find thresholds only related to alarms. I will try it when I will have my GPS modules back.

Thank you very much!
Milan

BTW: Nice examples on Hackster.io :slight_smile: