MPU6050 simple library

Dependents:   MPU6050_test Drone MPU6050_test acelerometro ... more

Revision:
4:3ae3b817e1f8
Parent:
1:cf3a9ec7205e
Child:
5:7bffa28ee936
diff -r 023399fc7ca5 -r 3ae3b817e1f8 MPU6050.h
--- a/MPU6050.h	Sun Jan 07 07:35:59 2018 +0000
+++ b/MPU6050.h	Thu Aug 15 03:04:11 2019 +0000
@@ -1,3 +1,8 @@
+/*
+*@file MPU6050.h
+*@brief This is API for MPU6050 6-axis sensor
+*/
+
 #ifndef __MPU6050_H
 #define __MPU6050_H
 
@@ -117,10 +122,27 @@
 {
 public:
     MPU6050(PinName sda, PinName scl);
+    /** Create a MPU6050 Instance
+    *@param sda SDA pinname of I2C
+    *@param scl SCL piname of I2C
+    */
+    
     void start(void);
+    /** Init MCP6050
+    */
+    
     char getID(void);
+    /**Get WHO_AM_I
+    */
+    
     bool read(float *gx, float *gy, float *gz,float *ax, float *ay, float *az);
+    /**Get data in float
+    */
+    
     bool readraw(int *gx, int *gy, int *gz,int *ax, int *ay, int *az);
+    /**Get data in int
+    */
+    
 private:
     I2C _MPU6050;
     float gx, gy, gz,ax,ay,az;