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: MMA8451Q SDFileSystem mbed
Fork of SDCardTest by
main.cpp
- Committer:
- ogarai
- Date:
- 2014-12-29
- Revision:
- 4:823307a8e5dc
- Parent:
- 3:68ef62208d4d
- Child:
- 6:f8e5916f19b8
File content as of revision 4:823307a8e5dc:
#include "mbed.h"
#include "SDFileSystem.h"
SDFileSystem sd(PTD2, PTD3, PTD1, PTD0, "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");
}
