pyupm_adxl335 module

class pyupm_adxl335.ADXL335(pinX, pinY, pinZ, aref=5.0)[source]

Bases: object

API for the ADXL335 3-Axis Analog Accelerometer.

ID: adxl335

Name: Low-power, 3-axis +/- 3 g Accelerometer

Other Names: Grove 3-Axis Analog Accelerometer

Category: accelerometer

Manufacturer: seeed

Connection: analog

Link:http://www.analog.com/en/products/mems/accelerometers/adxl335.html UPM module for the ADXL335 3-axis analog accelerometer. This was tested on a Grove 3-axis Analog Accelerometer. It uses 3 analog pins, one for each axis: X, Y, and Z.

C++ includes: adxl335.hpp

acceleration(*args)[source]

std::vector< float > acceleration()

Gets the acceleration along all 3 axes

std::vector of x, y, z acceleration values

calibrate()[source]

void calibrate()

While the sensor is still, measures the X-axis, Y-axis, and Z-axis values and uses those values as the zero values.

setZeroX(zeroX)[source]

void setZeroX(float zeroX)

Sets the “zero” value of the X-axis, determined through calibration

zeroX: “Zero” value of the X-axis

setZeroY(zeroY)[source]

void setZeroY(float zeroY)

Sets the “zero” value of the Y-axis, determined through calibration

zeroY: “Zero” value of the Y-axis

setZeroZ(zeroZ)[source]

void setZeroZ(float zeroZ)

Sets the “zero” value of the Z-axis, determined through calibration

zeroZ: “Zero” value of the Z-axis

values(*args)[source]

std::vector< int > values()

Gets the analog values for the 3 axes

std::vector of x, y, z analog acceleration values