API for the ADXL335 3-Axis Analog Accelerometer.
More...
- ID: adxl335
- Name: ADXL335 3-Axis Analog Accelerometer
- Other Names: Grove 3-Axis Analog Accelerometer
- Category: accelerometer
- Manufacturer: seeed
- Connection: analog
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.
ADXL335 |
( |
int |
pinX, |
|
|
int |
pinY, |
|
|
int |
pinZ, |
|
|
float |
aref |
|
) |
| |
ADXL335 constructor
- Parameters
-
pinX | Analog pin to use for X-axis |
pinY | Analog pin to use for Y-axis |
pinZ | Analog pin to use for Z-axis |
aref | Analog reference voltage; default is 5.0v |
float [] acceleration |
( |
| ) |
|
Gets the acceleration along all 3 axes
- Returns
- Array containing acceleration on X, Y, Z axes
While the sensor is still, measures the X-axis, Y-axis, and Z-axis values and uses those values as the zero values.
void setZeroX |
( |
float |
zeroX | ) |
|
Sets the "zero" value of the X-axis, determined through calibration
- Parameters
-
zeroX | "Zero" value of the X-axis |
void setZeroY |
( |
float |
zeroY | ) |
|
Sets the "zero" value of the Y-axis, determined through calibration
- Parameters
-
zeroY | "Zero" value of the Y-axis |
void setZeroZ |
( |
float |
zeroZ | ) |
|
Sets the "zero" value of the Z-axis, determined through calibration
- Parameters
-
zeroZ | "Zero" value of the Z-axis |
Gets the analog values for the 3 axes
- Returns
- Array containing value of X, Y, Z axes
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/upm-doc-stable/build-33/src/adxl335/ADXL335.java