pyupm_adxl345 module¶
-
class
pyupm_adxl345.
Adxl345
(bus)[source]¶ Bases:
object
API for the ADXL345 3-Axis Digital Accelerometer.
ID: adxl345
Name: 3-axis, +/- 2/4/8/16 g Digital Accelerometer
Other Names: Grove 3-Axis Digital Accelerometer (16g)
Category: accelerometer
Manufacturer: seeed
Connection: i2c
Link:http://www.analog.com/media/en/technical-documentation/data- sheets/ADXL345.pdf ADXL345 is a 3-axis digital accelerometer. (http://www.seeedstudio.com/wiki/images/2/2c/ADXL345_datasheet.pdf) The sensor has configurable resolutions to measure +/- 2g, +/- 4g, +/- 8g, or +/- 16g. Note: The Grove* version of the sensor is incompatible with and not detected on the I2C bus by the Intel(R) Edison using an Arduino* breakout board at 5V (3V works fine).
C++ includes: adxl345.hpp
-
getAcceleration
()[source]¶ float * getAcceleration()
there is no need for a ADXL345 object destructor ~Adxl345(); Returns a pointer to a float[3] that contains acceleration (g) forces
float* to a float[3]
-
getRawValues
()[source]¶ int16_t * getRawValues()
Returns a pointer to an int[3] that contains the raw register values for X, Y, and Z
int* to an int[3]
-