2020_8_30 他からライブラリを引っ張ってきた.

Dependencies:   mbed GPS_Interface

Revision:
1:aec45e847ec3
Parent:
0:8889ed33c550
Child:
2:ee6862d07ae9
--- a/main.cpp	Mon Aug 08 02:05:09 2016 +0000
+++ b/main.cpp	Tue Aug 16 15:57:35 2016 +0000
@@ -1,9 +1,10 @@
 #include "mbed.h"
- 
+
+DigitalOut myled(LED1);
 Serial gps(D1, D0);        // tx, rx
 Serial pc(USBTX, USBRX);    // tx, rx
  
-int main() {
+void pc_rx() {
 
       unsigned char c;
       int i,rlock;
@@ -54,4 +55,14 @@
         }
       }//if
     }//while
-}//main
\ No newline at end of file
+}
+
+int main(){
+    gps.attach(pc_rx,Serial::RxIrq);
+    while(1) {
+        myled = 1;
+        wait(0.2);
+        myled = 0;
+        wait(0.2);
+    }
+}
\ No newline at end of file