![](/media/cache/profiles/c51ce410c124a10e0db5e4b97fc2af39.50x50_q85.jpg)
An example using the SDFileSystem library to create a directory and write a fiel to an SD card, using its SPI interface
Dependencies: mbed SDFileSystem
main.cpp
- Committer:
- simon
- Date:
- 2010-06-03
- Revision:
- 0:aee5cf626b88
- Child:
- 1:27aaaa9f462b
File content as of revision 0:aee5cf626b88:
#include "mbed.h" #include "SDFileSystem.h" SDFileSystem sd(p11, p12, p13, p27, "sd"); int main() { printf("Hello World!\n"); FILE *fp = fopen("/sd/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"); }