Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of GPS_HelloWorld by
main.cpp
00001 #include "mbed.h" 00002 #include "GPS.h" 00003 00004 Serial pc(USBTX, USBRX); 00005 GPS gps(PTE22, PTE23); 00006 float frac_long, frac_lat; 00007 int main() { 00008 while(1) { 00009 if(gps.sample()) { 00010 pc.printf("longitud_entera=%d, Latitud entera=%d\n", (int)gps.longitude, (int)gps.latitude); 00011 frac_long=gps.longitude-(int)gps.longitude; 00012 pc.printf("Longitud Fraccionaria=%d\n", (int)abs(1000000*frac_long)); 00013 frac_lat=gps.latitude-(int)gps.latitude; 00014 pc.printf("Latitud fraccionaria=%d\n", (int)abs(1000000*frac_lat)); 00015 } else { 00016 00017 pc.printf("Oh Dear! No lock :(\n"); 00018 } 00019 } 00020 }
Generated on Sun Jul 17 2022 02:08:58 by
1.7.2
