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

Files at this revision

API Documentation at this revision

Comitter:
kaushik_ray_1
Date:
Tue Dec 30 23:59:23 2014 +0000
Parent:
5:9daddf40654f
Commit message:
Added the Acceleroneter data logging

Changed in this revision

MMA8451Q.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 diff for this revision Revisions of this file
mbed.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 9daddf40654f -r f8e5916f19b8 MMA8451Q.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA8451Q.lib	Tue Dec 30 23:59:23 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/quevedo/code/MMA8451Q/#7c9ab58f6af3
diff -r 9daddf40654f -r f8e5916f19b8 main.cpp
--- 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
diff -r 9daddf40654f -r f8e5916f19b8 mbed.bld
--- a/mbed.bld	Tue Dec 30 19:05:09 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file
diff -r 9daddf40654f -r f8e5916f19b8 mbed.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Tue Dec 30 23:59:23 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/#4fc01daae5a5