Program to read data from sensors, write them to a file which can then be interpreted by software to help show the path of a bicycle as it travels around a field

Dependencies:   C12832_lcd FatFileSystemCpp MMA7660 CMPS03 GPS

Fork of MSCUsbHost by Igor Skochinsky

Program to link a compass and a GPS to an MBED to produce a CSV file which can be used to track a bicycle around a field

Results can be found here

Revision:
6:09a0610af8b7
Parent:
5:b4d5a68654bb
Child:
7:c08305966384
--- a/main.cpp	Sat Mar 11 18:08:47 2017 +0000
+++ b/main.cpp	Sat Mar 11 18:43:08 2017 +0000
@@ -4,22 +4,22 @@
 #include "CMPS03.h" // Compass library
 #include "C12832_lcd.h" // LCD screen library
 #include "MSCFileSystem.h"
-
+ 
 #define FSNAME "USB"
 #define LIM 10
-
+ 
 GPS gps(p9, p10); // GPS Connection
 CMPS03 compass(p28, p27, CMPS03_DEFAULT_I2C_ADDRESS); // Compass connection
 MMA7660 MMA(p28, p27); // Accelerometer connection
 C12832_LCD lcd;
 Serial pc(USBTX, USBRX);
-
-
+ 
+ 
 // Declarations
 float ax, ay, az;
 DigitalOut connectionLed(LED1);
 MSCFileSystem msc("USB"); // Mount USB stick under the name "USB"
-
+ 
 int main()
 {
     /*
@@ -46,7 +46,7 @@
         fprintf(Accel,"%f, %f, %f,\r\n",ax,ay,az);
         lcd.locate(1,21);
         lcd.printf("Accel: %.2f, %.2f, %.2f", ax, ay, az);
-                
+/*                
         //GPS
         GPS = fopen("/USB/GPS.txt", "a");
         if (gps.sample())
@@ -73,9 +73,9 @@
         fprintf(Comp, "Bearing: %.2f\r\n", GenBearing);
         lcd.locate(1,11);
         lcd.printf("Offset: %.2f, CMP: %.2f", Offset/10, GenBearing);
-        
+*/        
         fclose(Accel);
-        fclose(GPS);
-        fclose(Comp);
+        //fclose(GPS);
+        //fclose(Comp);
     }
-}        
\ No newline at end of file
+}  
\ No newline at end of file