Dependencies:   MBed_Adafruit-GPS-Library SDFileSystem TextLCD mbed

Dependents:   SDWriteTest

Files at this revision

API Documentation at this revision

Comitter:
mburns1
Date:
Tue Mar 24 18:20:06 2015 +0000
Commit message:
ver1

Changed in this revision

MBed_Adafruit-GPS-Library.lib Show annotated file Show diff for this revision Revisions of this file
SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r d96c133bf9d2 MBed_Adafruit-GPS-Library.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MBed_Adafruit-GPS-Library.lib	Tue Mar 24 18:20:06 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/mlee350/code/MBed_Adafruit-GPS-Library/#a23e3099bb0a
diff -r 000000000000 -r d96c133bf9d2 SDFileSystem.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Tue Mar 24 18:20:06 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/mbed_official/code/SDFileSystem/#7b35d1709458
diff -r 000000000000 -r d96c133bf9d2 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Mar 24 18:20:06 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r d96c133bf9d2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 24 18:20:06 2015 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+#include "stdio.h"
+#include "string.h"
+
+DigitalOut myled(LED1); //initialize on board LED 
+DigitalIn toggle(p7);   //initialize toggle switch
+Serial GPS(p9, p10);    //initialize gps board
+Serial pc(USBTX, USBRX);//initialize serial pc connection
+SDFileSystem sd(p11,p12,p13,p14,"sd"); //Initializes filesystem (DI, D0, CLK, CS)
+int hasbeenopened = 1;
+int haslooped = 0;
+
+int main() {
+    char cc;
+    toggle.mode(PullUp);
+    FILE *fp = fopen("/sd/gpsdata.txt", "a");
+    while(1){
+        while(toggle==1){
+            if (hasbeenopened==0){
+                FILE *fp = fopen("/sd/gpsdata.txt", "a");
+                hasbeenopened=1;
+            }
+            myled=1;
+            cc = GPS.getc();
+            fprintf(fp,"%c", cc);
+            haslooped=1;
+        }
+        myled=0;
+        if (haslooped==1){
+            fclose(fp);
+            hasbeenopened=0;
+            haslooped=1;
+        }
+    }
+}
diff -r 000000000000 -r d96c133bf9d2 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 24 18:20:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac
\ No newline at end of file