n.n

Dependencies:   mbed GPS

Files at this revision

API Documentation at this revision

Comitter:
QuangAnhLe
Date:
Mon Aug 05 17:51:59 2019 +0000
Commit message:
1.commit

Changed in this revision

GPS.lib Show annotated file Show diff for this revision Revisions of this file
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 19357c8e66e0 GPS.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GPS.lib	Mon Aug 05 17:51:59 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/fookies/code/GPS/#8f2e256775d7
diff -r 000000000000 -r 19357c8e66e0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Aug 05 17:51:59 2019 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h"
+#include "GPS.h"
+#include <iostream>
+#include <sstream>
+#include <bitset>
+
+Serial pc(PA_2,PA_3);
+GPS gps (PA_9 ,PA_10);
+
+
+// output
+void TraceInt(int param)
+{
+    pc.printf("%d\r\n",param);
+}
+
+int main() {
+    pc.printf("Searching...");
+    int i = 0;
+    pc.baud(9600);
+    
+    while(1) {
+      
+      TraceInt(i++);
+      wait(1); 
+         /*if(gps.sample()){
+          float latitude = gps.latitude;
+          float longitude = gps.longitude;
+          float utc = gps.utc + 50000;
+          pc.printf("latitude: %0.2f, longitude: %0.2f, utc: %f\r\n",latitude,longitude,utc);
+          pc.printf("Lock Found!!!!");
+          wait(1);
+          }
+          else{
+              pc.printf("No Lock Found!!!!");
+              wait(1);
+              }*/
+        
+    }
+}
diff -r 000000000000 -r 19357c8e66e0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Aug 05 17:51:59 2019 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/235179ab3f27
\ No newline at end of file