GPS
Dependencies: C12832_lcd GPS mbed
Fork of mbed_gps by
main.cpp
00001 #include "mbed.h" 00002 #include "GPS.h" 00003 #include "C12832_lcd.h" 00004 C12832_LCD lcd; 00005 00006 //Serial pc(USBTX, USBRX); 00007 GPS gps(p9, p10); 00008 00009 int main() { 00010 while(1) { 00011 lcd.cls(); 00012 lcd.locate(3,3); 00013 if(gps.sample()) 00014 { 00015 lcd.printf("I'm at %f, %f\n", gps.longitude, gps.latitude); 00016 } 00017 else 00018 { 00019 lcd.cls(); 00020 lcd.locate(3,3); 00021 lcd.printf("Oh Dear!"); 00022 } 00023 wait(1); 00024 } 00025 } 00026
Generated on Thu Aug 11 2022 15:51:51 by 1.7.2