first publish

Dependencies:   MPU9150_DMP MotorControl QuaternionMath SimpleIOMacros mbed

Fork of cool_step by Siner Gokhan Yilmaz

Revision:
6:3bd16fdf0b6e
Parent:
5:3953111e9476
Child:
7:7f9abf427b06
--- a/main.cpp	Mon Apr 20 14:49:36 2015 +0000
+++ b/main.cpp	Tue Apr 21 07:30:19 2015 +0000
@@ -25,14 +25,13 @@
 {
     led1=!led1;
     printf("%d\r\n",timer2.read_us());
-    timer2.reset();
 }
 
 int main()
 {
     RN42.baud(9600);
     debug.baud(115200);
-    
+
     infoTicker.attach(infoTask,0.2f);
 
     if(imu.isReady()) {
@@ -51,10 +50,11 @@
 
     Quaternion q1;
     while(1) {
-        
+
         if(imu.getFifoCount() >= 48) {
             imu.getFifoBuffer(buffer,  48);
             led2 = !led2;
+            timer2.reset();
         }
 
         if(timer.read_ms() > 100) {