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: SDFileSystem mbed
Fork of SDFileSystem_HelloWorld by
main.cpp
00001 #include "mbed.h" 00002 #include "SDFileSystem.h" 00003 00004 SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board 00005 00006 int main() { 00007 printf("Hello World!\n"); 00008 00009 mkdir("/sd/mydir", 0777); 00010 00011 FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); 00012 if(fp == NULL) { 00013 error("Could not open file for write\n"); 00014 } 00015 fprintf(fp, "Hello fun SD Card World!"); 00016 fclose(fp); 00017 00018 printf("Goodbye World!\n"); 00019 }
Generated on Sat Jul 16 2022 07:53:35 by
1.7.2
