![](/media/cache/profiles/bd1ce36d68a5c2bea97fe45863673b20.jpg.50x50_q85.jpg)
PROGRAMA SIMPLE QUE LEE UNA TRAMA DE GPS Y LA PONE EN PANTALLA DE LA TERMINAL DEL PC
Fork of GPS_HelloWorld by
Diff: main.cpp
- Revision:
- 0:6b7345059afe
- Child:
- 1:99bb5d61015f
diff -r 000000000000 -r 6b7345059afe main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jun 08 14:12:30 2010 +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"); + } + } +}