![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First issue to MK
Dependencies: mbed QEI LM75B C12832_lcd2 FatFileSystem MSCFileSystem
main.cpp
- Committer:
- chris
- Date:
- 2012-10-16
- Revision:
- 2:c887cf1c3ed9
- Parent:
- 0:22a5db2c7926
- Child:
- 3:b4435a45fdc7
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; }