Code du GPS (Adam Wronski et Nassim Deleau)

Dependencies:   mbed GPS

Committer:
simon
Date:
Tue Jun 08 14:12:30 2010 +0000
Revision:
0:6b7345059afe
Child:
1:b619e1d3af6e

        

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);
simon 0:6b7345059afe 5 GPS gps(p9, p10);
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 {
simon 0:6b7345059afe 12 pc.printf("Oh Dear! No lock :(\n");
simon 0:6b7345059afe 13 }
simon 0:6b7345059afe 14 }
simon 0:6b7345059afe 15 }