program to blink two leds along with value of N

Fork of blink_LED by Anjali jangalagi

blink.cpp

Committer:
2bv14ei014
Date:
2016-11-11
Revision:
0:d1d2410ad028

File content as of revision 0:d1d2410ad028:

#include "Blinker.h"
#include "mbed.h"
 
Blinker::Blinker(PinName pin) : LED1(pin) 
{
    LED1 = 0;
}
 LED2(pin)
 {
    LED2 = 0; 
    }
void Blinker::Blink(int n) {
    for(int i=0; i<n*2; i++) {
        LED1=1;
        wait(0.2);
        LED1=0;
        wait(0.2);
        LED2=1;
        wait(0.2);
        LED2=0;
        wait(0.2);
        
        
    }
}