Sølibatgutt / Mbed 2 deprecated Oppgave52b

Dependencies:   mbed

Revision:
0:b705d77ebf7c
diff -r 000000000000 -r b705d77ebf7c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 03 11:09:32 2017 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1), led2(LED4);
+void blink5(int Tp, int Ta, int antall, DigitalOut &rLed);
+
+
+int main()
+{
+    blink5(500,500,4, myled);
+    blink5(250,250,10,led2);
+    return 0;
+}
+void blink5(int Tp, int Ta, int antall, DigitalOut &rLed)
+{
+    for (int i=0; i<antall; i++) {
+        rLed=1;
+        wait_ms(Tp);
+        rLed=0;
+        wait_ms(Ta);
+    }
+      
+        
+}
\ No newline at end of file