dvdwsojl

Dependencies:   mbed SDFileSystem

Files at this revision

API Documentation at this revision

Comitter:
Yukihisa
Date:
Mon Mar 04 13:03:03 2019 +0000
Parent:
1:e4d7342be507
Commit message:
SD mbed;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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);