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.
Diff: main.cpp
- Revision:
- 0:a6eefc8c816e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Jan 03 10:49:57 2010 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+LocalFileSystem local("local");
+
+int main() {
+ FILE *fp = fopen("/local/lines.txt", "r");
+
+ if(!fp) {
+ error("Could not open file!\n");
+ }
+
+ char buffer[128];
+ while(fgets(buffer, 128, fp)) {
+ printf("Line: %s\n", buffer);
+ wait(1);
+ }
+
+ fclose(fp);
+
+ printf("Done\n");
+}