Acceleration in meter per second square

Fork of MPU6050 by Baser Kandehir

Revision:
8:0e3519559bcb
Parent:
7:c9f95ebeb780
--- a/MPU6050.cpp	Sat May 14 05:32:28 2016 +0000
+++ b/MPU6050.cpp	Wed Jun 15 22:28:32 2016 +0000
@@ -59,6 +59,7 @@
 // Sensor datas
 float ax,ay,az;
 float gx,gy,gz;
+float axx;
 int16_t accelData[3],gyroData[3],tempData;
 float accelBias[3] = {0, 0, 0};  // Bias corrections for acc
 float gyroBias[3] = {0, 0, 0};   // Bias corrections for gyro 
@@ -142,15 +143,15 @@
 void MPU6050::checkaddress()
 {
     uint8_t checkaddress = readByte(MPU6050_ADDRESS, CHECKADDRESS_MPU6050);   // Should return 0x68
-    pc.printf("I AM 0x%x \r\n",checkaddress);
+    pc.printf("Sensor Address ID: 0x%x \r\n",checkaddress);
     
     if(checkaddress==0x68)
     {
-        pc.printf("MPU6050 is connected... \r\n");  
+        pc.printf("IMU is online now... \r\n");  
     }
     else
     {
-        pc.printf("No connection to MPU6050 !! Check the connections... \r\n");  
+        pc.printf("No connection to IMU !! Check the connections... \r\n");  
     }  
 }
 
@@ -353,6 +354,8 @@
     ax = accelData[0]*aRes - accelBias[0];
     ay = accelData[1]*aRes - accelBias[1];
     az = accelData[2]*aRes - accelBias[2]; 
+    
+    axx = 9.80665f * ax;
 
     /* Get actual gyro value */
     readGyroData(gyroData);