change code by hasegawa
jy901.h@0:f80d034ed481, 2017-08-23 (annotated)
- Committer:
- number_key
- Date:
- Wed Aug 23 05:25:50 2017 +0000
- Revision:
- 0:f80d034ed481
- Child:
- 1:60d4e2eb6952
jy901
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
number_key | 0:f80d034ed481 | 1 | #ifndef MBED_JY901_H |
number_key | 0:f80d034ed481 | 2 | #define MBED_JY901_H |
number_key | 0:f80d034ed481 | 3 | |
number_key | 0:f80d034ed481 | 4 | #include "mbed.h" |
number_key | 0:f80d034ed481 | 5 | #include "jy901_def.h" |
number_key | 0:f80d034ed481 | 6 | |
number_key | 0:f80d034ed481 | 7 | |
number_key | 0:f80d034ed481 | 8 | class JY901 : public I2C |
number_key | 0:f80d034ed481 | 9 | { |
number_key | 0:f80d034ed481 | 10 | public: |
number_key | 0:f80d034ed481 | 11 | JY901(PinName sda, PinName scl); |
number_key | 0:f80d034ed481 | 12 | |
number_key | 0:f80d034ed481 | 13 | void calibrateGyroAccel(); |
number_key | 0:f80d034ed481 | 14 | void calibrateMagnetic(); |
number_key | 0:f80d034ed481 | 15 | void calibrateHeight(); |
number_key | 0:f80d034ed481 | 16 | void endCalibrate(); |
number_key | 0:f80d034ed481 | 17 | void calibrateAll(int time); |
number_key | 0:f80d034ed481 | 18 | float getXaxisAcceleration(); |
number_key | 0:f80d034ed481 | 19 | float getYaxisAcceleration(); |
number_key | 0:f80d034ed481 | 20 | float getZaxisAcceleration(); |
number_key | 0:f80d034ed481 | 21 | float getXaxisAngularVelocity(); |
number_key | 0:f80d034ed481 | 22 | float getYaxisAngularVelocity(); |
number_key | 0:f80d034ed481 | 23 | float getZaxisAngularVelocity(); |
number_key | 0:f80d034ed481 | 24 | float getXaxisMagnetic(); |
number_key | 0:f80d034ed481 | 25 | float getYaxisMagnetic(); |
number_key | 0:f80d034ed481 | 26 | float getZaxisMagnetic(); |
number_key | 0:f80d034ed481 | 27 | float getXaxisAngle(); |
number_key | 0:f80d034ed481 | 28 | float getYaxisAngle(); |
number_key | 0:f80d034ed481 | 29 | float getZaxisAngle(); |
number_key | 0:f80d034ed481 | 30 | |
number_key | 0:f80d034ed481 | 31 | private: |
number_key | 0:f80d034ed481 | 32 | char *getdata(char registar); |
number_key | 0:f80d034ed481 | 33 | }; |
number_key | 0:f80d034ed481 | 34 | |
number_key | 0:f80d034ed481 | 35 | #endif |