Fork of Simon Ford's SDCardTest repo to make it work with FRDM-KL25Z. Also, I am using the SDFileSystem repo as a library dependency as opposed to using the hard-coded SDFileSystem.

Dependencies:   MMA8451Q SDFileSystem mbed

Fork of SDCardTest by Simon Ford

Revision:
6:f8e5916f19b8
Parent:
4:823307a8e5dc
--- a/main.cpp	Tue Dec 30 19:05:09 2014 +0000
+++ b/main.cpp	Tue Dec 30 23:59:23 2014 +0000
@@ -1,17 +1,30 @@
 #include "mbed.h"
 #include "SDFileSystem.h"
+#include "MMA8451Q.h"
 
 SDFileSystem sd(PTD2, PTD3, PTD1, PTD0, "sd");
+MMA8451Q acc(PTE25,PTE24);
+
+
 
 int main() {
-    printf("Hello World!\n");   
-
+    int16_t data[3];
+    
     FILE *fp = fopen("/sd/sdtest.txt", "w");
     if(fp == NULL) {
         error("Could not open file for write\n");
     }
-    fprintf(fp, "Hello fun SD Card World!");
+    while(1)
+    {
+        acc.getAccAllAxis(data);  
+        fprintf(fp, "%d",data[0]);
+        fprintf(fp, ", %d",data[1]);
+        fprintf(fp, ", %d\n",data[2]);
+ /*       if()
+        {
+            break;
+        }*/
+    }
     fclose(fp); 
-
     printf("Goodbye World!\n");
-}   
+}   
\ No newline at end of file