gps nmea sample program

Dependencies:   mbed

Fork of GPS by Simon Ford

Revision:
1:8de9bf0961a0
diff -r 15611c7938a3 -r 8de9bf0961a0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Feb 14 07:35:23 2017 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "GPS.h"
+ 
+Serial pc(USBTX, USBRX);
+GPS gps(p9, p10);
+ 
+int main() {
+    while(1) {
+        if(gps.sample()) {
+            pc.printf("I'm at %f, %f\n", gps.longitude, gps.latitude);
+        } else {
+            pc.printf("Oh Dear! No lock :(\n");
+        }
+    }
+}
\ No newline at end of file