tracker
Dependencies: C12832_lcd CMPS03 FatFileSystemCpp GPS_copy mbed
Fork of Tracker_2 by
Revision 5:c58216bb4e32, committed 2018-03-12
- Comitter:
- Noah_Newsom
- Date:
- Mon Mar 12 18:15:16 2018 +0000
- Parent:
- 4:6c258ed4635e
- Commit message:
- Tracker new with __
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Mar 10 12:17:10 2018 +0000 +++ b/main.cpp Mon Mar 12 18:15:16 2018 +0000 @@ -23,9 +23,12 @@ lcd.printf("Connect GPS to pins 9 & 10"); gps.Init(); gps.parseData(); + FILE *fp = fopen( "/" FSNAME "/Tracker_data.txt", "a"); + fprintf(fp,"---A New reset---"); + fclose(fp); while(1) { if(gps.parseData()) { - FILE *fp = fopen( "/" FSNAME "/Tracker_data.txt", "w"); + FILE *fp = fopen( "/" FSNAME "/Tracker_data.txt", "a"); lcd.cls(); lcd.locate(1,0); lcd.printf("%f, %f, %d\n", gps.latitude, gps.longitude, gps.hours); @@ -36,7 +39,7 @@ lcd.locate(1,22); lcd.printf("Satellites: %02d\n", gps.satellites); lcd.invert(0); - fprintf(fp, "%f %f %f %02d:%02d:%02.0f\n ", gps.latitude, gps.longitude,(compass.readBearing() / 10.0),gps.hours, gps.minutes, gps.seconds); + fprintf(fp, "%f %f %f %02d:%02d:%02.0f__\n", gps.latitude, gps.longitude,(compass.readBearing() / 10.0),gps.hours, gps.minutes, gps.seconds); fclose(fp); } else { lcd.cls();//clear LCD for next reading round