AnsweredAssumed Answered

How do I use an accelerometer to detect and count the number of shakes a device receives?

Question asked by Curt Naumann on May 24, 2017
Latest reply on Jun 28, 2017 by Dario Arias

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,