apenas pega nos dados recebidos do simulador de GPS na porta uart2 e envia processada para o pc. A FUNCIONAR!

Dependencies:   SerialGPS mbed

Fork of Sparkfun_GPS_Shield by Shields

Revision:
2:17b641282f3f
Parent:
1:6bba24a04008
--- a/main.cpp	Fri Jul 25 12:25:21 2014 +0000
+++ b/main.cpp	Wed Jul 12 10:58:32 2017 +0000
@@ -22,23 +22,27 @@
 /** On many platforms USBTX/USBRX overlap with serial on D1/D0 pins and enabling the below will interrupt the communication.
  *  You can use an LCD display to print the values or store them on an SD card etc.
  */
-//Serial pc(USBTX, USBRX);
+Serial pc(USBTX, USBRX); Porta série da ficha SDA da placa, usa o putty ou outro terminal tipo teraterm ou mobaxterm com a porta série que o pc configura para mbed
 
 /**
  * D1 - TX pin (RX on the GPS module side)
  * D0 - RX pin (TX on the GPS module side)
  * 4800 - GPS baud rate
  */
-SerialGPS gps(D1, D0, 4800);
+SerialGPS gps(PTE22, PTE23, 9600);  // PTE23 - liga no Tx do conversor e PTE23 no Rx do conversor, atenção à porta série que o teu pc atribui ao conversor
 
 DigitalOut myled(LED1);
 
-int main() {
+main(void) {
+    int erro;
     while (1) {
+        pc.printf("Hello World!\n\r");
+        
+        myled = myled ? 0 : 1;
         if (gps.sample()) {
-            myled = myled ? 0 : 1;
-            printf("sats %d, long %f, lat %f, alt %f, geoid %f, time %f\n\r", gps.sats, gps.longitude, gps.latitude, gps.alt, gps.geoid, gps.time);
-            wait(1);
+        pc.printf("sats %d, long %f, lat %f, alt %f, geoid %f, time %f\n\r", gps.sats, gps.longitude, gps.latitude, gps.alt, gps.geoid, gps.time);
         }
+        wait(1);
+        
     }
 }
\ No newline at end of file