Looks like the ff function free fall is the right track.
There are two different interrupt pins on the chip a register controls which one is used
and a different register controls polarity.
Which interuppt pin is being used?
Any bits set to 0 in this register send their respective interrupts to
the INT1 pin, whereas bits set to 1 send their respective interrupts
to the INT2 pin. All selected interrupts for a given pin are OR’ed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Looks like the ff function free fall is the right track.
There are two different interrupt pins on the chip a register controls which one is used
and a different register controls polarity.
Which interuppt pin is being used?
http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf
page 27
Register 0x2F—INT_MAP (R/W)
Any bits set to 0 in this register send their respective interrupts to
the INT1 pin, whereas bits set to 1 send their respective interrupts
to the INT2 pin. All selected interrupts for a given pin are OR’ed.