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.
main.cpp
- Committer:
- simon
- Date:
- 2010-01-03
- Revision:
- 0:a6eefc8c816e
File content as of revision 0:a6eefc8c816e:
#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");
}