Oppgave 5.1b

Dependencies:   mbed

main.cpp

Committer:
Smashftw
Date:
2017-09-26
Revision:
0:c9b5d0a77d0f

File content as of revision 0:c9b5d0a77d0f:

#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);
    }