30 #include <mraa/i2c.hpp> 36 #define LSM303DLH_MAG 0x1E 37 #define LSM303DLH_ACC 0x19 40 #define CTRL_REG1_A 0x20 41 #define CTRL_REG2_A 0x21 42 #define CTRL_REG3_A 0x22 43 #define CTRL_REG4_A 0x23 44 #define CTRL_REG5_A 0x24 46 #define CRA_REG_M 0x00 47 #define CRB_REG_M 0x01 50 #define OUT_X_H_M 0x03 52 #define OUT_X_L_A 0x28 53 #define OUT_X_H_A 0x29 54 #define OUT_Y_L_A 0x2A 55 #define OUT_Y_H_A 0x2B 56 #define OUT_Z_L_A 0x2C 57 #define OUT_Z_H_A 0x2D 93 LSM303DLH_ACC_T } LSM303DLH_SLAVE_T;
103 int addrMag=LSM303DLH_MAG,
104 int addrAcc=LSM303DLH_ACC,
173 int readThenWrite(uint8_t reg);
174 mraa::Result setRegisterSafe(LSM303DLH_SLAVE_T slave, uint8_t sregister, uint8_t data);
int16_t getAccelX()
Definition: lsm303dlh.cxx:107
int16_t getCoorZ()
Definition: lsm303dlh.cxx:160
API for the LSM303DLH Accelerometer & Compass.
Definition: lsm303dlh.hpp:89
mraa::Result getCoordinates()
Definition: lsm303dlh.cxx:125
int16_t * getRawAccelData()
Definition: lsm303dlh.cxx:95
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
mraa::Result getAcceleration()
Definition: lsm303dlh.cxx:174
float getHeading()
Definition: lsm303dlh.cxx:80
int16_t getCoorY()
Definition: lsm303dlh.cxx:155
int16_t getAccelY()
Definition: lsm303dlh.cxx:113
int16_t getAccelZ()
Definition: lsm303dlh.cxx:119
int16_t * getRawCoorData()
Definition: lsm303dlh.cxx:101
LSM303DLH(int bus, int addrMag=LSM303DLH_MAG, int addrAcc=LSM303DLH_ACC, int accScale=8)
Definition: lsm303dlh.cxx:38
int16_t getCoorX()
Definition: lsm303dlh.cxx:150