programme GPS pour ERS4

Dependencies:   mbed

Fork of GPS_IUT_Nice by tito tito

Committer:
dreday20
Date:
Fri Nov 23 19:10:01 2012 +0000
Revision:
0:2c0686a07ab8
Child:
1:f24af888e699
1.0;

Who changed what in which revision?

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