Skip to content

Reading data from the ADXL345 accelerometer over SPI on a raspberry pi w/ python

License

Notifications You must be signed in to change notification settings

dzheng256/adxl345spi-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

adxl345spi-py

Reading data from the ADXL345 accelerometer over SPI on a raspberry pi w/ python. Essentially a python port of part of this project.

Setup

First install the pigpio library.

wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make -j4
make install

Then clone this library and install with python setup.py install.

Usage

Start the pigpiod daemon with sudo pigpiod. Then, you can use the library like this:

from adxl345 import adxl345
adxl = adxl345.ADXL345(sample_rate=100)
adxl.read_one()
adxl.close()

About

Reading data from the ADXL345 accelerometer over SPI on a raspberry pi w/ python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages