-
I think the inability to detect movement is an issue of how you programmed your code Erwan. I guess your use of conditional statements (If else if…) is the problem. Unfortunately we can not tell from the incomplete code you posted. I expect you will have better success using only the accelerometer x and y axis measurements (ignore the z axis which measures gravity) and you might have a better result.
-
This discussion ( OrientationSensor Pitch movement (or how to use Accelerometer to detect movement) ) is about a developer making a similar app . The developer uses an orientation, then an accelerometer and finally decides that the best tool is a gyroscope. The discussion might help you to debug your code.
Regards,
Steve