1st release.

Dependencies:   SDFileSystem mbed

Fork of SDFileSystem_HelloWorld_WIZwiki-W7500 by WIZnet

main.cpp

Committer:
WizLeo
Date:
2015-06-22
Revision:
1:d53e2a035111
Parent:
0:bdbd3d6fc5d5

File content as of revision 1:d53e2a035111:

#include "mbed.h"
#include "SDFileSystem.h"
 
SDFileSystem sd(PB_3, PB_2, PB_1, PB_0, "sd"); // the pinout on the mbed Cool Components workshop board
 
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");
}