Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystem
Diff: main.cpp
- Revision:
- 2:9adf8313ac9f
- Parent:
- 0:bdbd3d6fc5d5
diff -r e4d7342be507 -r 9adf8313ac9f main.cpp
--- a/main.cpp Tue May 16 05:18:55 2017 +0000
+++ b/main.cpp Mon Mar 04 13:03:03 2019 +0000
@@ -8,10 +8,11 @@
mkdir("/sd/mydir", 0777);
- FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
+ FILE *fp = fopen("/sd/mydir/sdtest.txt", "a");
if(fp == NULL) {
- error("Could not open file for write\n");
+ error("Could not open file for write");
}
+ fprintf(fp,"\n");
fprintf(fp, "Hello fun SD Card World!");
fclose(fp);