MPU6050 simple library
Dependents: MPU6050_test Drone MPU6050_test acelerometro ... more
Diff: MPU6050.h
- Revision:
- 7:f80a0baa6866
- Parent:
- 6:37d0473b0bf4
- Child:
- 9:2dd52ac40c96
--- a/MPU6050.h Thu Aug 15 03:12:09 2019 +0000 +++ b/MPU6050.h Thu Aug 15 03:17:43 2019 +0000 @@ -123,24 +123,30 @@ public: /** Create a MPU6050 Instance + * *@param sda SDA pinname of I2C *@param scl SCL piname of I2C */ MPU6050(PinName sda, PinName scl); /** Init MCP6050 + * */ void start(void); /**Get WHO_AM_I + * + *@return 0x68 */ char getID(void); - /**Get WHO_AM_I + /**Get data in float + * */ bool read(float *gx, float *gy, float *gz,float *ax, float *ay, float *az); /**Get data in int + * */ bool readraw(int *gx, int *gy, int *gz,int *ax, int *ay, int *az);