I am reading an accelerometer that gives me number on the 3 axis (X, Y, Z).
I want to detect when my piece is stopped, however when it is stopped the number that I get from the sensor in all the axis is not "0" and always change.
What I want to do is:
When the number coming from the sensor does not change during 3 seconds I want to receive a bang
Any of you have some idea about how to do that?