Write 10 lines of Accelerometer data from FRDM-KL25Z to SD Card and read it back.
Dependencies: MMA8451Q SDFileSystem mbed
Fork of SDCardTest by
Revision 8:8d866ae976a3, committed 2014-12-31
- Comitter:
- ogarai
- Date:
- Wed Dec 31 06:57:15 2014 +0000
- Parent:
- 7:dbf3c52ac1b5
- Commit message:
- Switch from test mode to data-logging mode
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Dec 31 06:38:35 2014 +0000
+++ b/main.cpp Wed Dec 31 06:57:15 2014 +0000
@@ -12,8 +12,9 @@
if(fp == NULL) {
error("Could not open file for write\n");
}
-
- for(int i=0;i<10;i++)
+ // Enable the below line and disable the next line for testing
+// for(int i=0;i<10;i++)
+ while(1)
{
acc.getAccAllAxis(data);
fprintf(fp, "%d",data[0]);
