change code by hasegawa
Diff: jy901.h
- Revision:
- 1:60d4e2eb6952
- Parent:
- 0:f80d034ed481
- Child:
- 2:a93909601341
--- a/jy901.h Wed Aug 23 05:25:50 2017 +0000 +++ b/jy901.h Wed Aug 23 06:00:02 2017 +0000 @@ -7,29 +7,85 @@ class JY901 : public I2C { - public: +public: + + /** + * @param sda + * @param scl + */ JY901(PinName sda, PinName scl); + /** calibrate Gyroscope and Accelerometer + */ void calibrateGyroAccel(); + + /** calibrate Magnetic + */ void calibrateMagnetic(); + + /** set height to 0 + */ void calibrateHeight(); + + /** end calibration mode + */ void endCalibrate(); + + /** calibrate Gyroscope, Accelerometer and Magnetic + * set height to 0 + */ void calibrateAll(int time); + + /** return XaxisAcceleration + */ float getXaxisAcceleration(); + + /** return YaxisAcceleration + */ float getYaxisAcceleration(); + + /** return ZaxisAcceleration + */ float getZaxisAcceleration(); + + /** return XaxisAngularVelocity + */ float getXaxisAngularVelocity(); + + /** return YaxisAngularVelocity + */ float getYaxisAngularVelocity(); + + /** return ZaxisAngularVelocity + */ float getZaxisAngularVelocity(); + + /** return XaxisMagnetic + */ float getXaxisMagnetic(); + + /** return YaxisMagnetic + */ float getYaxisMagnetic(); + + /** return ZaxisMagnetic + */ float getZaxisMagnetic(); + + /** return XaxisAngle + */ float getXaxisAngle(); + + /** return YaxisAngle + */ float getYaxisAngle(); + + /** return ZaxisAngle + */ float getZaxisAngle(); - + private: char *getdata(char registar); -}; + }; -#endif \ No newline at end of file + #endif \ No newline at end of file