test program for the HK10DOF library

Dependencies:   HK10DOF mbed

Files at this revision

API Documentation at this revision

Comitter:
pommzorz
Date:
Wed Jul 17 18:54:46 2013 +0000
Commit message:
test program for the HK10DOF library

Changed in this revision

HK10DOF.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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HK10DOF.lib	Wed Jul 17 18:54:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/pommzorz/code/HK10DOF/#85fcfcb7b137
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jul 17 18:54:46 2013 +0000
@@ -0,0 +1,52 @@
+
+#include "mbed.h"
+#include "math.h"
+
+#include "HMC5883L.h"
+#include "ADXL345_I2C.h"
+#include "L3G4200D.h"
+#include "BMP085.h"
+#include "HK10DOF.h"
+
+//#include "PwmIn.h"
+
+
+PwmOut rled(LED_RED);
+PwmOut gled(LED_GREEN);
+PwmOut bled(LED_BLUE);
+
+HK10DOF imu(PTE0,PTE1);
+float ypr[3];
+float values[9];
+
+int main()
+{
+    rled=1;
+    gled=1;
+    
+    imu.pc.printf("Ceci est un Test\r\n");
+    imu.init(true);
+    imu.pc.printf("Test passe\r\n");
+    float alt=0;
+
+
+    while(1) {
+        //imu.getValues(values);
+        imu.getYawPitchRoll(ypr);
+        imu.pc.printf("YAW: %03.0f PITCH: %03.0f ROLL: %03.0f \n\r",ypr[0],ypr[1],ypr[2]);
+        alt=imu.getBaroAlt();
+        //imu.pc.printf("ALT : %03.0f",alt);
+        
+        //imu.pc.printf("ACC: %04.0f %04.0f %04.0f GYR: %04.0f %04.0f %04.0f MAG: %04.0f %04.0f %04.0f \n\r",values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], values[8] );
+        wait_ms(1);
+        bled=!bled;
+
+
+
+    }
+
+
+
+
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jul 17 18:54:46 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file