I am new to this platform so I apologize if I am asking question in an incorrect manner
I am not a physic student hence the reason I am here to clarify some of my doubts. I have this idea of using an accelerometer to just see if some object (e.g. toy car, bicycle) is moving or not through the acceleration data by the accelerometer.
I know accelerometer does not give linear acceleration but with gravity hence will compensate the gravity to obtain the linear acceleration which is $(0,0,0)$ for $x, y, z$.
Using the linear acceleration of all axis i will find the total acceleration and then integrate it to find the velocity that will prompt me to know if the object is moving if it is $0$ (stationary)= not moving, if it is above a value it is consider moving.
I just want to know if this method will work, if I am wrong. I would like to seek some advises to do it the correct way