28 #include "../bus/BusDevice.h"
31 #define BUFFER_SIZE 0x40
57 unsigned char *registers;
60 short accelerationX, accelerationY, accelerationZ;
62 short combineRegisters(
unsigned char msb,
unsigned char lsb);
63 void calculatePitchAndRoll();
64 virtual int updateRegisters();
plus/minus 16g
Definition: ADXL345.h:47
RESOLUTION
The resolution of the sensor. High is only available in +/- 16g range.
Definition: ADXL345.h:50
Specific class for the ADXL345 Accelerometer.
Definition: ADXL345.h:39
virtual void setRange(ADXL345::RANGE range)
Definition: ADXL345.cpp:168
virtual float getPitch()
Definition: ADXL345.h:78
NORMAL 10-bit resolution.
Definition: ADXL345.h:51
virtual int readSensorState()
Definition: ADXL345.cpp:149
virtual ADXL345::RANGE getRange()
Definition: ADXL345.h:71
virtual short getAccelerationZ()
Definition: ADXL345.h:77
virtual void setResolution(ADXL345::RESOLUTION resolution)
Definition: ADXL345.cpp:177
virtual ADXL345::RESOLUTION getResolution()
Definition: ADXL345.h:73
Definition: BusDevice.cpp:27
plus/minus 2g
Definition: ADXL345.h:44
RANGE
An enumeration to define the gravity range of the sensor.
Definition: ADXL345.h:43
This class is the parent of I2C and SPI devices, so that devices that use both SPI and I2C interfaces...
Definition: BusDevice.h:37
HIGH 13-bit resolution.
Definition: ADXL345.h:52
virtual short getAccelerationY()
Definition: ADXL345.h:76
virtual float getRoll()
Definition: ADXL345.h:79
virtual short getAccelerationX()
Definition: ADXL345.h:75
plus/minus 4g
Definition: ADXL345.h:45
virtual void displayPitchAndRoll(int iterations=600)
Definition: ADXL345.cpp:186
plus/minus 8g
Definition: ADXL345.h:46
virtual ~ADXL345()
Definition: ADXL345.cpp:196
ADXL345(BusDevice *busDevice)
Definition: ADXL345.cpp:127