Test with SD Card
Dependencies: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
main.cpp
- Committer:
- sunnagarajan
- Date:
- 2018-08-01
- Revision:
- 2:9d9db0a5de35
- Parent:
- 0:bdbd3d6fc5d5
File content as of revision 2:9d9db0a5de35:
#include "mbed.h" #include "SDFileSystem.h" SDFileSystem sd(PB_15, PB_14, PB_13, PB_12, "sd"); int main() { printf("Hello World!\n"); mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); if(fp == NULL) { error("Could not open file for write\n"); } fprintf(fp, "Hello fun SD Card World!"); fclose(fp); printf("Goodbye World!\n"); }