Morsecode programma opdracht 1.1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lennartgroen
Date:
Sat Mar 10 09:38:02 2018 +0000
Commit message:
Eerste uitgave;

Changed in this revision

MorseCode.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 5a59e3e00ed6 MorseCode.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MorseCode.cpp	Sat Mar 10 09:38:02 2018 +0000
@@ -0,0 +1,45 @@
+/*
+Namen: Lennart Groen
+Klas: EMT1PSa
+Opdracht: MBED - Morse code blinker
+Samengewerkt met: ...
+Datum: 10-03-2018
+Inspiratie uit:
+*/
+
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+void s()
+{
+    for(int i = 0; i<3; i++){
+    myled = 1;
+    wait(0.2);
+    myled = 0;
+    wait(0.2);
+    }
+}
+
+void o()
+{
+    for(int i = 0; i<2; i++){
+    myled = 1;
+    wait(0.5);
+    myled = 0;
+    wait(0.5);
+    }
+}
+
+int main()
+{
+    while(1){
+    s();
+    o();
+    s();
+    wait(1);
+    }
+}
+    
+
+
diff -r 000000000000 -r 5a59e3e00ed6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Mar 10 09:38:02 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/aa5281ff4a02
\ No newline at end of file