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 wave_player SDFileSystem
main.cpp
00001 #include "mbed.h" 00002 #include "SDFileSystem.h" 00003 00004 SDFileSystem sd(D11, D12, D13, D10, "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 Mon Sep 5 2022 02:01:55 by
1.7.2