Morsecode programma opdracht 1.1

Dependencies:   mbed

MorseCode.cpp

Committer:
lennartgroen
Date:
2018-03-10
Revision:
0:5a59e3e00ed6

File content as of revision 0:5a59e3e00ed6:

/*
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);
    }
}