MMA8452Q - Interrupt on Tap

I have the Sparkfun MMA8452Q accelerometer and am using your library:

https://github.com/sparkfun/sparkfun_mm … le_library

Is there a way to configure the interrupt pins to be activated on a tap? Would be more efficient than just polling using the readTap() function. Any help would be appreciated.

Thanks, Chip

Hi Chip.

The library supports tap detection, but sadly we don’t have any example code that shows how to use it. I don’t happen to have one on me to test, but it looks like tap detection might be enabled in the library by default, you might connect a scope up to the interrupt pins and tap/double tap the sensor and see if anything gets output.

Correction, I found another library that has an example for reading taps, I’m not sure why it’s not linked in our tutorials, but give this a try:

  • - [sparkfun /SparkFun_MMA8452Q_Arduino_Library
  • [/list]](GitHub - sparkfun/SparkFun_MMA8452Q_Arduino_Library: SparkFun Triple Axis Accelerometer Breakout - MMA8452Q Arduino Library)