I have a cylinder with an attached MMA8652 accelerometer. Initally, the cylinder is at rest and vertical on a flat surface (i.e. table). Once the cylinder is picked from the table and tilted away from vertical, it is then shaken back and forth.
Where can I find code that is able to detect a back and forth shake (a single shake cycle) and count the number of shake of complete and/or partial shake cyles?
Thank you,
-Curt