![](/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
main.cpp@1:99bb5d61015f, 2014-10-20 (annotated)
- 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?
User | Revision | Line number | New 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 | } |