my own library

Dependencies:   mbed

Committer:
chetanpatil
Date:
Wed Nov 25 11:45:49 2015 +0000
Revision:
0:b11ee52a944e
my library

Who changed what in which revision?

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