Oppgave9.1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Smashftw
Date:
Tue Oct 31 12:43:49 2017 +0000
Commit message:
Oppgave 9.1

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 31 12:43:49 2017 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+DigitalOut Led1(LED1);
+LocalFileSystem local("local");
+int main()
+{
+    int i=0, t=0;
+
+    FILE *fp = fopen("/local/fil1.txt", "w");
+    if (fp == NULL) {
+        Led1 = 1;
+        return  1;
+    }
+
+    while (i < 100) {
+        for(t=0; t<10; t++) {
+            fprintf(fp,"%3d", i);
+            i++;
+        }
+        
+            fprintf(fp, "\n");
+        
+    }
+    fclose(fp);
+    return 0;
+    
+    
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 31 12:43:49 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file