file
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
main.cpp
- Committer:
- nehap
- Date:
- 2015-11-25
- Revision:
- 1:55b4dc63f976
- Parent:
- 0:bdbd3d6fc5d5
File content as of revision 1:55b4dc63f976:
#include "mbed.h" #include "SDFileSystem.h" Serial pc(USBTX, USBRX); SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board int main() { printf("Welcome to sd card interface\n"); mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/Heo world.docx", "r"); if(fp == NULL) { error("not able to open for read operation\n"); } fprintf(fp,"Hello fun SD Card World\n"); fclose(fp); printf("found\n"); }