configuration de l\'IMU chr-um6 via le Mbed

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
belloula
Date:
Tue Mar 06 11:04:10 2012 +0000
Parent:
0:9aa10932bd4f
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 9aa10932bd4f -r 805f3ddb2ee5 main.cpp
--- a/main.cpp	Fri Oct 21 15:05:55 2011 +0000
+++ b/main.cpp	Tue Mar 06 11:04:10 2012 +0000
@@ -1,16 +1,17 @@
 #include "mbed.h"
-//conecte imu to pc via xbee to calibrate imu via "AHRSInterfacex86" soft
+//Connect IMU to pc via Xbee to calibrate IMU via "AHRSInterfacex86" soft
+
 Serial pc(USBTX, USBRX);
 DigitalOut myled(LED1);
 Serial xbee(p9, p10);
 DigitalOut rst1(p11);
-Serial imu(p13, p14);
+Serial imu(p28, p27);
 
-void fxbee()
+void fpc()
 {
-    while(xbee.readable())
+    while(pc.readable())
     {
-            imu.putc(xbee.getc());
+            imu.putc(pc.getc());
     }
 }
 
@@ -18,17 +19,18 @@
 {
     while(imu.readable())
     {
-            xbee.putc(imu.getc());
+          pc.putc(imu.getc());
+          //pc.printf("%X\r\n",imu.getc());
     }
 }
 
 int main() 
 {
-    xbee.baud(115200);
+    pc.baud(115200);
     imu.baud(115200);
     
     imu.attach(fimu);
-    xbee.attach(fxbee);
+    pc.attach(fpc);
     //reset xbee module
     rst1 = 0;   
     wait_ms(1);
@@ -39,6 +41,7 @@
         while(1) 
          
         {
+           pc.printf("salut");
            myled = 0;
            wait_ms(500);
            myled = 1;