33 #define ADXL335_DEFAULT_AREF 5.0 34 #define ADXL335_SENSITIVITY 0.25 // 0.25v/g 73 ADXL335(
int pinX,
int pinY,
int pinZ,
float aref=ADXL335_DEFAULT_AREF);
85 void setZeroX(
float zeroX) { m_zeroX = zeroX; };
92 void setZeroY(
float zeroY) { m_zeroY = zeroY; };
99 void setZeroZ(
float zeroZ) { m_zeroZ = zeroZ; };
108 void values(
int *xVal,
int *yVal,
int *zVal);
115 std::vector<int>
values();
124 void acceleration(
float *xAccel,
float *yAccel,
float *zAccel);
140 mraa_aio_context m_aioX;
141 mraa_aio_context m_aioY;
142 mraa_aio_context m_aioZ;
144 float m_zeroX, m_zeroY, m_zeroZ;
void calibrate()
Definition: adxl335.cxx:109
void setZeroZ(float zeroZ)
Definition: adxl335.hpp:99
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
~ADXL335()
Definition: adxl335.cxx:66
ADXL335(int pinX, int pinY, int pinZ, float aref=ADXL335_DEFAULT_AREF)
Definition: adxl335.cxx:37
void setZeroY(float zeroY)
Definition: adxl335.hpp:92
void setZeroX(float zeroX)
Definition: adxl335.hpp:85
std::vector< float > acceleration()
Definition: adxl335.cxx:102
std::vector< int > values()
Definition: adxl335.cxx:80
API for the ADXL335 3-Axis Analog Accelerometer.
Definition: adxl335.hpp:63