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 SDFileSystem
Diff: main.cpp
- Revision:
- 2:42934a548cd9
- Parent:
- 0:bdbd3d6fc5d5
--- a/main.cpp Tue May 16 05:18:55 2017 +0000
+++ b/main.cpp Thu Nov 14 00:10:52 2019 +0000
@@ -1,14 +1,16 @@
#include "mbed.h"
#include "SDFileSystem.h"
-SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
+//Serial pc(USBTX, USBRX);
+SDFileSystem sd(PE_6, PE_5, PE_2, PE_4, "sd"); // the pinout on the mbed Cool Components workshop board, for BIG BOARD
+//SDFileSystem sd(PA_7, PA_6, PA_5, PA_4, "sd");
int main() {
printf("Hello World!\n");
- mkdir("/sd/mydir", 0777);
+// mkdir("/sd/mydir", 0777);
- FILE *fp = fopen("/sd/mydir/sdtest.txt", "w");
+ FILE *fp = fopen("/sd/test.txt", "w");
if(fp == NULL) {
error("Could not open file for write\n");
}
@@ -16,4 +18,4 @@
fclose(fp);
printf("Goodbye World!\n");
-}
+}
\ No newline at end of file