Narongdet Phonphuak / Mbed 2 deprecated GPS_classroom

Dependencies:   GPS TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
narongdet
Date:
Mon May 04 04:38:21 2015 +0000
Commit message:
GPS_classroom

Changed in this revision

GPS.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GPS.lib	Mon May 04 04:38:21 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/fookies/code/GPS/#8f2e256775d7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon May 04 04:38:21 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/oscarvzfz/code/TextLCD/#d824a83e56e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 04 04:38:21 2015 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "GPS.h"
+#include "TextLCD.h"
+GPS gps(PA_11,PA_12);
+I2C i2c_lcd(D14,D15); 
+TextLCD_I2C lcd(&i2c_lcd, 0x4E, TextLCD::LCD16x2); 
+int main() 
+{
+    lcd.setMode(TextLCD::DispOn);
+    lcd.setBacklight(TextLCD::LightOff);
+    lcd.setCursor(TextLCD::CurOff_BlkOff);
+    lcd.setAddress(0,0);
+    lcd.printf("Initial GPS...\n");
+  
+    while(1){
+        if(gps.sample())
+        {
+            lcd.setAddress(0,1);
+            lcd.printf("%6.3f,%7.3f",gps.latitude,gps.longitude);
+        }
+        else
+        {
+            lcd.setAddress(0,1);
+            lcd.printf("GPS not valid");
+        }
+        wait(0.5);
+    }
+}    
+            
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon May 04 04:38:21 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058
\ No newline at end of file