AnsweredAssumed Answered

Problem with Arduino & MMA8451 interrupt settings

Question asked by Mark Ross-Smith on Dec 3, 2017
Latest reply on Jan 30, 2018 by Mark Ross-Smith

Hi. I am building a game using a MMA8451Q breakout board connected to an Arduino Uno.  The standalone device, powered by battery, must create an interrupt if z-axis acceleration exceeds a value (say, 2g) AND the vertical movement exceeds a value (say, 30mm).  I calculate the vertical movement by double-integrating the positive acceleration readings.

 

My problem is that tell-tales I have in the software show inconsistent results between vertical lifts.  Even when it appears to work, the vertical acceleration required to get it to wake up and fire is way more than the threshold I have set.  I have been struggling with this problem for weeks now.  The Application Notes for the MMA are confusing for me, and I would really appreciate some feedback on my software, and particularly the register settings, which I attach.

 

Many thanks in anticipation!

Attachments

Outcomes