I was able to get the tap function working with the ADXL345 accelerometer, but not on my own. I used this person’s library and code to get started. I added some LEDs in the section the author conveniently set up at the bottom that light up when various functions are detected.
Green = inactivity
Yellow = activityPurple = tap
Blue = double tap
Red = freefall
I couldn’t get the freefall on camera. As you can see, it’s a bit finicky. When the double-tap is detected the single tap and activity are also detected. I’m a little confused as to how this actually works. Reading the datasheet I thought I would have to connect the interrupt pins, but this code works without them.