PROGRAMA SIMPLE QUE LEE UNA TRAMA DE GPS Y LA PONE EN PANTALLA DE LA TERMINAL DEL PC

Dependencies:   GPS7 mbed

Fork of GPS_Google by Gustavo Ramirez

Committer:
tony63
Date:
Mon Oct 20 05:42:03 2014 +0000
Revision:
1:99bb5d61015f
Parent:
0:6b7345059afe
Child:
2:5abd8a794703
PROGRAMA SIMPLE QUE LEE UNA TRAMA DE GPS Y LA PONE EN PANTALLA DE LA TERMINAL DEL PC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:6b7345059afe 1 #include "mbed.h"
simon 0:6b7345059afe 2 #include "GPS.h"
simon 0:6b7345059afe 3
simon 0:6b7345059afe 4 Serial pc(USBTX, USBRX);
tony63 1:99bb5d61015f 5 GPS gps(PTE22, PTE23);
simon 0:6b7345059afe 6
simon 0:6b7345059afe 7 int main() {
simon 0:6b7345059afe 8 while(1) {
simon 0:6b7345059afe 9 if(gps.sample()) {
simon 0:6b7345059afe 10 pc.printf("I'm at %f, %f\n", gps.longitude, gps.latitude);
simon 0:6b7345059afe 11 } else {
tony63 1:99bb5d61015f 12
simon 0:6b7345059afe 13 pc.printf("Oh Dear! No lock :(\n");
simon 0:6b7345059afe 14 }
simon 0:6b7345059afe 15 }
simon 0:6b7345059afe 16 }