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

main.cpp

Committer:
simon
Date:
2010-06-08
Revision:
0:6b7345059afe
Child:
1:99bb5d61015f

File content as of revision 0:6b7345059afe:

#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");
        }
    }
}