J Daniel Martinez C
/
Practica5B-Escitura-SDUSB
Escritura SD USB
Fork of FileSys-MultiFileSystem by
main.cpp
- Committer:
- chris
- Date:
- 2012-10-16
- Revision:
- 2:c887cf1c3ed9
- Parent:
- 0:22a5db2c7926
- Child:
- 3:a72f30142261
File content as of revision 2:c887cf1c3ed9:
#include "mbed.h" #include "MSCFileSystem.h" MSCFileSystem fs("fs"); DigitalOut led(LED1); AnalogIn pot1(p19); int main() { FILE *fp = fopen("/fs/test.csv","w"); printf("Create filehandle for test.csv\n"); printf("Writing to file\n"); for (int i=0; i<100; i++) { fprintf(fp,"%.2f\n",pot1.read()); wait(0.05); led=!led; } fclose(fp); printf("Close the handle\n"); led=1; }