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
00001 #include "mbed.h" 00002 00003 DigitalOut myled(LED1); 00004 LocalFileSystem local("local"); 00005 00006 int main() { 00007 FILE *fp = fopen("/local/lines.txt", "r"); 00008 00009 if(!fp) { 00010 error("Could not open file!\n"); 00011 } 00012 00013 char buffer[128]; 00014 while(fgets(buffer, 128, fp)) { 00015 printf("Line: %s\n", buffer); 00016 wait(1); 00017 } 00018 00019 fclose(fp); 00020 00021 printf("Done\n"); 00022 }
Generated on Sat Jul 16 2022 23:30:02 by
1.7.2