Allowed for the choosing the g-range of the accelerometer. Scaling also tracks choice so units and values are correct
Dependents: LCD_punch_mtr_8_v5 LCD_punch_mtr_8_v5
Fork of MMA8451Q by
Diff: MMA8451Q8.h
- Revision:
- 6:e0dc3cd59991
- Parent:
- 5:5a7293378401
diff -r 5a7293378401 -r e0dc3cd59991 MMA8451Q8.h --- a/MMA8451Q8.h Thu Dec 11 00:36:30 2014 +0000 +++ b/MMA8451Q8.h Wed Jan 28 20:42:56 2015 +0000 @@ -98,7 +98,8 @@ */ void getAccAllAxis(float * res); - + int16_t getAccAxis(uint8_t addr); + I2C m_i2c; int m_addr; int gChosen; @@ -111,7 +112,7 @@ void writeRegs(uint8_t * data, int len); private: - int16_t getAccAxis(uint8_t addr); + };