FreeIMU demo program for mbed

Dependencies:   FreeIMU mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
tyftyftyf
Date:
Thu Mar 29 22:35:55 2018 +0000
Parent:
2:a3bdc53fab66
Commit message:
parameter tuning

Changed in this revision

FreeIMU.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/FreeIMU.lib	Fri Jan 10 05:53:34 2014 +0000
+++ b/FreeIMU.lib	Thu Mar 29 22:35:55 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/tyftyftyf/code/FreeIMU/#a79af1283446
+http://mbed.org/users/tyftyftyf/code/FreeIMU/#de24fce0509a
--- a/main.cpp	Fri Jan 10 05:53:34 2014 +0000
+++ b/main.cpp	Thu Mar 29 22:35:55 2018 +0000
@@ -18,7 +18,7 @@
 
 void getIMUdata(void const *n){
     i++;
-    if (i%10==0){
+    if (i%20==0){
         float *q = (float *)imu_queue.alloc();
         t.reset();
         t.start();
@@ -34,11 +34,16 @@
 }
 
 int main() {
+    pc.baud(115200);
     imu.init(true);
-    pc.baud(115200);
     RtosTimer IMUTimer(getIMUdata, osTimerPeriodic, (void *)0);
     IMUTimer.start(2);
     t2.start();
+    int16_t raw_values[9];
+    
+    Thread::wait(10);
+    
+    pc.printf("Init\r\n");
     
     while (true) {
         t2.reset();
@@ -47,7 +52,6 @@
             imu_t *obj = (imu_t*)evt.value.p;
             pc.printf("Y: %f, P: %f, R: %f, Alt: %f, Temp: %fC\r\n", obj->ypr[0], obj->ypr[1], obj->ypr[2], obj->alt, obj->temp);
             imu_queue.free(obj);
-            pc.printf("\r\n");
         }
     }
 }
--- a/mbed-rtos.lib	Fri Jan 10 05:53:34 2014 +0000
+++ b/mbed-rtos.lib	Thu Mar 29 22:35:55 2018 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed-rtos/#29007aef10a4
+http://mbed.org/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- a/mbed.bld	Fri Jan 10 05:53:34 2014 +0000
+++ b/mbed.bld	Thu Mar 29 22:35:55 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/f37f3b9c9f0b
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/994bdf8177cb
\ No newline at end of file