GPSの動作確認プログラム(main.cpp込み)

Dependencies:   getGPS mbed

Revision:
1:9d198383f15c
Parent:
0:cc8b4152b0cf
--- a/main.cpp	Sat Jul 07 08:11:29 2018 +0000
+++ b/main.cpp	Sat Jul 07 11:24:03 2018 +0000
@@ -6,14 +6,17 @@
 
 int main()
 {
-    pc.printf("\r\n\nMission Start\r\n");
-
+    pc.printf("\r\n\GPS Start\r\n");
+    
+    /* 1秒ごとに現在地を取得してターミナル出力 */
     while(1) {
-        if(gps.getgps())
+        if(gps.getgps()) //現在地取得
             pc.printf("(%lf, %lf)\r\n", gps.latitude, gps.longitude);
         
         else
             pc.printf("No data\r\n");
+        
+        wait(1);
     }
 
     return 0;