Library for accelerometer KXR94-2050
KXR94_2050.h
- Committer:
- 66keg
- Date:
- 2015-01-03
- Revision:
- 1:b3acee234ab5
- Parent:
- 0:2700ada3a245
- Child:
- 2:1e4a75b43643
File content as of revision 1:b3acee234ab5:
#ifndef KXR94_2050_H #define KXR94_2050_H #include "mbed.h" #define PI 3.1415926535 class KXR94_2050 { public: KXR94_2050(PinName OutX, PinName OutY, PinName OutZ); ~KXR94_2050(); void setZeroVal(uint16_t x_zero, uint16_t y_zero, uint16_t z_zero); void getRawData(float &pitch, float &roll); // degree data private: AnalogIn _OutX, _OutY, _OutZ; int _mean_average_num; uint16_t X_ZERO_VAL; uint16_t Y_ZERO_VAL; uint16_t Z_ZERO_VAL; }; #endif