diff --git a/MMA8452.h b/MMA8452.h index 83e65db..91c26f8 100644 --- a/MMA8452.h +++ b/MMA8452.h @@ -157,7 +157,9 @@ class MMA8452 void setOffsets(int8_t x, int8_t y, int8_t z); void setActive(bool active = true); - + + void getPitchRoll(float *pitch, float *roll); + void initPitchRoll(float alpha); private: bool active; @@ -173,6 +175,8 @@ class MMA8452 float convertGCounts(uint16_t data); int8_t convertTo2sComplement(int8_t value); + + float fXg, fYg, fZg, alpha; }; -#endif // MMA8452_H_ \ No newline at end of file +#endif // MMA8452_H_