change code by hasegawa
Diff: jy901.h
- Revision:
- 0:f80d034ed481
- Child:
- 1:60d4e2eb6952
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jy901.h Wed Aug 23 05:25:50 2017 +0000 @@ -0,0 +1,35 @@ +#ifndef MBED_JY901_H +#define MBED_JY901_H + +#include "mbed.h" +#include "jy901_def.h" + + +class JY901 : public I2C +{ + public: + JY901(PinName sda, PinName scl); + + void calibrateGyroAccel(); + void calibrateMagnetic(); + void calibrateHeight(); + void endCalibrate(); + void calibrateAll(int time); + float getXaxisAcceleration(); + float getYaxisAcceleration(); + float getZaxisAcceleration(); + float getXaxisAngularVelocity(); + float getYaxisAngularVelocity(); + float getZaxisAngularVelocity(); + float getXaxisMagnetic(); + float getYaxisMagnetic(); + float getZaxisMagnetic(); + float getXaxisAngle(); + float getYaxisAngle(); + float getZaxisAngle(); + + private: + char *getdata(char registar); +}; + +#endif \ No newline at end of file