/ADXL345-Python

A Python module to handle the I2C communication between a Raspberry Pi and an ADXL345

Primary LanguagePythonMIT LicenseMIT

ADXL345-Python

You can use this program to interact with the ADXL345 Accelerometer using your Raspberry Pi.

What you need is the python-smbus library, if you don't have this library installed yet you can install it using:

	sudo apt-get install python-smbus

Once you've installed smbus you can import ADXL345.py in your own python programs. you have to make sure that ADXL345.py is in the same directory as your python program.

To import the library, add this to your program:

	from ADXL345 import ADXL345

Please note that for this program to work you need to have i2c enabled on your Raspberry Pi.