LED blink

Dependencies:   mbed

Committer:
chetanpatil
Date:
Tue Nov 24 05:19:22 2015 +0000
Revision:
0:02489f35e512
LED blink;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chetanpatil 0:02489f35e512 1 #include "Flasher.h"
chetanpatil 0:02489f35e512 2 #include "mbed.h"
chetanpatil 0:02489f35e512 3
chetanpatil 0:02489f35e512 4 Flasher::Flasher(PinName pin) : _pin(pin) {
chetanpatil 0:02489f35e512 5 _pin = 0;
chetanpatil 0:02489f35e512 6 }
chetanpatil 0:02489f35e512 7
chetanpatil 0:02489f35e512 8 void Flasher::flash(int n) {
chetanpatil 0:02489f35e512 9 for(int i=0; i<n*2; i++) {
chetanpatil 0:02489f35e512 10 _pin = !_pin;
chetanpatil 0:02489f35e512 11 wait(0.2);
chetanpatil 0:02489f35e512 12 }
chetanpatil 0:02489f35e512 13 }