GPS test code OEM719

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tomoyuki1021
Date:
Tue Apr 12 00:35:57 2022 +0000
Commit message:
GPS test code

Changed in this revision

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
diff -r 000000000000 -r eb37ceb83476 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 12 00:35:57 2022 +0000
@@ -0,0 +1,55 @@
+#include "mbed.h"
+Serial gps(p9, p10);       // TX, RX
+Serial pc(USBTX, USBRX);    // TX, RX
+
+//int main()
+//{
+//    printf("--Start--\r\n");
+//    printf("--Please Input Command--\r\n");
+//    while(1){
+//    for(int i=0;i<=5;i++){
+//        pc.printf("LOG VERSION\r\n");
+//        wait(1.0);
+//        gps.printf("LOG VERSION\r\n");
+//        wait(1.0);
+//        }
+//    }
+//}
+
+int main()
+{
+    printf("--Start--\r\n");
+    printf("--Please Input Command--\r\n");
+    while(1){
+        char c=pc.getc();
+        switch (c){
+        case '1':
+             pc.printf("LOG VERSION\r\n");
+             gps.printf("LOG VERSION\r\n");
+             break;
+        case '2':
+            pc.printf("LOG RXSTATUS\r\n");
+            gps.printf("LOG RXSTATUS\r\n");
+            break;
+        case '3':
+            pc.printf("LOG GPGGA\r\n");
+            gps.printf("LOG GPGGA\r\n");
+            break;
+        case '4':
+            pc.printf("LOG RANGE\r\n");
+            gps.printf("LOG RANGE\r\n");
+            break;
+        case '5':       
+            pc.printf("LOG RANGEA\r\n");
+            gps.printf("LOG RANGEA\r\n");
+            break;
+        case '6':
+            pc.printf("LOG TIMEA\r\n");
+            gps.printf("LOG TIMEA\r\n");
+            break;
+            }
+    while(1){
+        pc.putc(gps.getc());
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r eb37ceb83476 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 12 00:35:57 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file