Gps

Dependencies:   mbed

Fork of GPS_System_with_Google_Maps by fadi ladhari

Committer:
wallsow
Date:
Fri Jan 06 13:33:19 2017 +0000
Revision:
7:73d911fc2bfa
Parent:
6:8cc48b05d20e
Child:
8:c0a52f5de10d
Gps; ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 1:31e50fea8be8 1 #include "mbed.h"
Ifrah 3:3c7906d60f89 2 #include "GPS.h"
wallsow 7:73d911fc2bfa 3 Serial pc(PA_0,PA_1);
Ifrah 3:3c7906d60f89 4
wallsow 7:73d911fc2bfa 5 GPS ark(PA_2,PA_3);
fadi_lad 6:8cc48b05d20e 6 DigitalOut myled(LED1);
Ifrah 3:3c7906d60f89 7
Ifrah 3:3c7906d60f89 8 int main()
Ifrah 3:3c7906d60f89 9 {
Ifrah 3:3c7906d60f89 10 while(1) {
wallsow 7:73d911fc2bfa 11 pc.printf("\r\n GPS Test program");
wallsow 7:73d911fc2bfa 12 pc.printf("\r\n******\r\n");
fadi_lad 6:8cc48b05d20e 13 if( ark.sample() == 1) {
fadi_lad 6:8cc48b05d20e 14 myled=0;
fadi_lad 6:8cc48b05d20e 15 float latitude = ark.latitude;
fadi_lad 6:8cc48b05d20e 16 float longitude = ark.longitude;
fadi_lad 6:8cc48b05d20e 17 float utc =50000;
fadi_lad 6:8cc48b05d20e 18 pc.printf("latitude: %0.2f, longitude: %0.2f, utc: %f\r\n",latitude,longitude,utc);
fadi_lad 6:8cc48b05d20e 19 wait(1);
Ifrah 3:3c7906d60f89 20 } else {
fadi_lad 6:8cc48b05d20e 21 myled=1;
Ifrah 3:3c7906d60f89 22 }
Ifrah 3:3c7906d60f89 23 }
samux 0:64c683256184 24 }