Exploring the advanced features of the ADXL345 Accelerometer: single & double tap, activity, inactivity, free fall, power saving

I spent a couple of days playing with the advanced features of the ADXL345 accelerometer. These are all configurable in the various registers of the chip, is just a matter of studying a bit the specs and doing some tests.

I’ve been able to implement: power management (the chip goes to sleep after some amounts of inactivity for time and then start doing full measurements when it detects activity again) and the related activity and inactivity detection, per axis single and double tap detection as well as free fall detection.

The video below shows you what I have been able to accomplish. All the source codes are available in the attachments below and released under GNU GLP v3 license.

The code is pretty well documented and self explaining. In case you have a question feel free to leave a comment below.

AttachmentSize
Processing Code for ADXL345 with Interrupts handling36.27 KB
Arduino Code for ADXL345 advanced features15.41 KB
Scroll to Top