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.
Dependencies: C12832_lcd CMPS03 FatFileSystemCpp GPS MMA7660 mbed
Fork of CompleteMbed by
Diff: main.cpp
- Revision:
- 4:db6f9f91a04b
- Parent:
- 3:05d2d090b8b0
- Child:
- 5:651dc38cc1a6
diff -r 05d2d090b8b0 -r db6f9f91a04b main.cpp --- a/main.cpp Wed May 07 10:22:15 2014 +0000 +++ b/main.cpp Wed May 07 10:27:35 2014 +0000 @@ -3,6 +3,7 @@ #include "MMA7660.h" #include "CMPS03.h" #include "MSCFileSystem.h" +#include "C12832_lcd.h" #define FSNAME "USB" @@ -11,6 +12,7 @@ GPS gps(p9, p10); // GPS connections MMA7660 MMA(p28, p27); // Accelerometer connections CMPS03 compass(p28, p27, CMPS03_DEFAULT_I2C_ADDRESS); // Compass connections +C12832_LCD lcd; // Declarations float ax, ay, az; // acceleration values @@ -67,9 +69,9 @@ pc.printf("The reference bearing: %f\n\n", refPoint/10); while(i == 1) { - FILE *CompassFile = fopen("/" FSNAME "/compass_file.txt", "a"); - FILE *GPSFile = fopen("/" FSNAME "/gps_file.txt", "a"); - FILE *AccelFile = fopen("/" FSNAME "/accel_file.txt", "a"); + CompassFile = fopen("/" FSNAME "/compass_file.txt", "a"); + GPSFile = fopen("/" FSNAME "/gps_file.txt", "a"); + AccelFile = fopen("/" FSNAME "/accel_file.txt", "a"); // GPS code if(gps.sample()) { @@ -79,7 +81,7 @@ } else { - fprintf(GPSFIle, "\nNo lock!\r\n"); + fprintf(GPSFile, "\nNo lock!\r\n"); lcd.locate(1,1); lcd.printf("GPS: No lock!"); }