Skip to content

wrh2/ADXL345

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADXL345 Python Module

A simple python module for controlling an ADXL345 via SPI with a raspberry pi 3.

Polling example

For help on how to use, check the wiki

Dependencies

spidev

RPi.GPIO

Features

About

Every example that I could find for the ADXL345 was written in either C or python, and, with the exception of a few C examples, they all used I2C. I needed to use the ADXL345 via SPI to test some code I had written for another project so I created this module. After talking with a colleague that had trouble using SPI with Python on a raspberry pi, I decided to share this here.

The code was written for and tested on a raspberry pi 3 with Python 2.7 and Python 3.4

Tests

A unit test framework for the module using python's unittest module is included.

TODO

  • Configure interrupts for Activity/Inactivity, free-fall, tap detection
  • Add more tests (e.g. test scaling factors when not in full-resolution mode)
  • Incorporate FIFO use

About

Python SPI module for ADXL345 by Analog Devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages