Thanks Erik Olieman for his beta library, that saved me a huge amount of time when getting Raw data from MPU6050 module! I was able to update this library by adding additional functions, which would allow a fast angle calculation by using complementary filter. I will probably be updating this library more soon to add additional functionality or make some changes that would look sensible.

Dependents:   QuadcopterProgram 3DTracking ControlYokutan2017 Gyro ... more

Fork of MPU6050 by Erik -

Revision:
9:898effccce30
Parent:
8:b1570b99df9e
Child:
10:bd9665d14241
--- a/MPU6050.h	Fri Feb 13 01:16:00 2015 +0000
+++ b/MPU6050.h	Thu Feb 19 00:15:52 2015 +0000
@@ -83,9 +83,9 @@
 
 #define RADIANS_TO_DEGREES 180/3.1415926536
 
-#define ALPHA 0.97   //filter constant
+#define ALPHA 0.96   //filter constant
 
-#define GYRO_SCALE 2.31 //scale the gyro
+#define GYRO_SCALE 2.7176 //scale the gyro
 
 /** MPU6050 IMU library.
   *
@@ -276,13 +276,14 @@
      void computeAngle (float *angle, float *accOffset, float *gyroOffset, float *currTime, float *prevTime);
      void enableInt( void );
      void disableInt( void );
-     
+     void setAlpha(float val);
      
      private:
 
      I2C connection;
      char currentAcceleroRange;
      char currentGyroRange;
+     float alpha;
      
 
 };