Oppgave 5.1b

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Smashftw
Date:
Tue Sep 26 11:07:46 2017 +0000
Commit message:
Oppgave51b

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 Sep 26 11:07:46 2017 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+int blink1, blink2;
+int main() 
+     {
+        int n = 20;
+        while(n>0) {
+        blink1();
+        blink2(2, 3);
+        n--;
+    }return 0;
+}
+void blink1(void){
+    myled =1;
+    wait(0.2);
+    myled =0;
+    wait(0.3);
+    }
+    
+void blink2(int Tp, int Ta){
+    myled=1;
+    wait(Tp);
+    myled=0;
+    wait(Ta);
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 26 11:07:46 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/675da3299148
\ No newline at end of file