El-POM1001 / Mbed 2 deprecated LAB02_Oppgave4

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
madmonkeyman82
Date:
Thu Oct 15 15:50:55 2015 +0000
Commit message:
first

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
diff -r 000000000000 -r 619fe21b6bc5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 15 15:50:55 2015 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+//Define leds
+BusOut leds(D8,D9,D10,D11,D12,D13,D4,D5);
+
+//Define Switches
+BusIn buttons(A0,A1,A2,A3,A4,A5,D2,D3);
+
+
+
+int main() {
+    
+    int antallBlink = 0;
+
+    while (true)
+    {
+       printf("Skriv inn hvor mange ganger lysdiodene skal blinke:\r\n");
+    scanf ("%d",&antallBlink);
+    for(int i=0; i<antallBlink; i++){
+        leds=0x00;
+        wait_ms(200);
+        leds=0xFF;
+        wait_ms(200);
+        
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 619fe21b6bc5 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 15 15:50:55 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad
\ No newline at end of file