Chris Styles / Mbed 2 deprecated app-board-MSCFileSystem

Dependencies:   FatFileSystem MSCFileSystem mbed

Fork of app-board-LocalFileSystem by Chris Styles

Revision:
1:00053ea8a833
Parent:
0:e762099aba67
Child:
2:d2b00172588d
--- a/main.cpp	Thu Apr 18 12:48:24 2013 +0000
+++ b/main.cpp	Thu Apr 18 13:13:04 2013 +0000
@@ -3,14 +3,20 @@
 AnalogIn pot1(p19);
 DigitalOut myled(LED1);
 
+LocalFileSystem fs("fs");
+
 int main()
 {
 
+    FILE *fp = fopen("/fs/data.csv","w");
+    
     for (int i=0; i < 100 ; i++) {
-        printf("%.2f\n",pot1.read());
+        fprintf(fp,"%.2f\n",pot1.read());
         wait(0.05);
         myled = !myled;
     }
+    
+    fclose(fp);
     myled = 1;
 
 }