GPS and IMU reading works

Dependencies:   mbed Servo SDFileSystem

/media/uploads/taoqiuyang/img_2352.jpg

Revision:
1:e7245ffb4820
Parent:
0:f4d390c06705
Child:
2:afb333543af5
--- a/main.cpp	Sat Aug 08 06:22:37 2015 +0000
+++ b/main.cpp	Sat Aug 08 07:05:21 2015 +0000
@@ -2,15 +2,26 @@
  
 Serial pc(USBTX, USBRX); // tx, rx
 Serial device(p28, p27);  // tx, rx
+char buf[256];
  
 int main() {
     device.baud(57600);
+
     while(1) {
-        if(pc.readable()) {
-            device.putc(pc.getc());
-        }
-        if(device.readable()) {
-            pc.putc(device.getc());
-        }
+
+        //if(device.readable()) {
+            device.gets(buf, 256);
+            pc.printf("%s\n", buf);
+       // }
+        
+    
+    
+    
+    
+    
+    
+    
+    
+    
     }
 }
\ No newline at end of file