IDXL345 and Adafruit ADXL345 library

I am using this version of the board from ebay: ADXL345 Triple Axis Accelerometer (GY-291) Arduino Raspberry Pi AVR PIC | eBay

Just in case others have used these and found that they are faulty.

Does anyone have a working sketch that uses the Adafruit ADXL345 library to generate a tap or freefall interrupt.

The single example that comes with the library does not create any interrupts.

I don't know whether I am using the various registers incorrectly or whether the chip is faulty and wont generate interrupts.

What are your test conditions that should generate a freefall interrupt?

stowite:
What are your test conditions that should generate a freefall interrupt?

I couldn't get the free fall interrupt to work so I tried a tap interrupt instead. I have tried dropping the break out board on my desk and tapping it with a finger with no luck triggering the interrupt.

XYZ registers are being read and displayed correctly and my added pitch and roll angle function seems to be working. I found the calibration sketch and used the XYZ data generated how I assume it is meant to be used. Unfortunately the calibration sketch generates more data than can be put in the ADXL345 offset registers and there is no explanation on the web page that explains to an ADXL345 novice how to use it.

INT1 of ADXL345 is connected to pin2 of my Mega (int 0).

Sketch and Adafruit library files are attached - I have made some additions to the library for my own convenience but all the original functions are the same.

All I really need is an example some one has done that uses the Adafruit ADXL345 library to successfully create and interrupt, with what ever ADXL345 device they have, so I can compare how they set the registers up with the way I have done it.

There must be someone out there.

Adafruit_ADXL345_U.h (15.4 KB)

Adafruit_ADXL345_U.cpp (12.5 KB)

sensortest.ino (5.73 KB)