a

Dependencies:   MPU6050 ledControl2 mbed

Fork of i2c_MPU6050 by Baser Kandehir

Files at this revision

API Documentation at this revision

Comitter:
tktats_892476
Date:
Mon Aug 27 06:29:50 2018 +0000
Parent:
7:3e1e78b34e1a
Commit message:
aa

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 3e1e78b34e1a -r 07118817bdb2 main.cpp
--- a/main.cpp	Wed Aug 05 13:15:31 2015 +0000
+++ b/main.cpp	Mon Aug 27 06:29:50 2018 +0000
@@ -86,7 +86,8 @@
     wait(1);
     pc.printf("MPU6050 is initialized for operation.. \r\n\r\n");
     wait_ms(500);
-    
+    filter.attach(&compFilter, 0.001);    // Call the complementaryFilter func. every 5 ms (200 Hz sampling period)
+        
     while(1) 
     {
      
@@ -99,15 +100,11 @@
 //        
 //        wait(2.5);
                 
-        filter.attach(&compFilter, 0.005);    // Call the complementaryFilter func. every 5 ms (200 Hz sampling period)
         
-        pc.printf(" _______________\r\n");
-        pc.printf("| Pitch: %.3f   \r\n",pitchAngle);
+        pc.printf("| Pitch: %.3f   ",pitchAngle);
         pc.printf("| Roll:  %.3f   \r\n",rollAngle);
-        pc.printf("|_______________\r\n\r\n");
         
-        wait(1);
-     
+        
     }
 }