flasher

Committer:
azab
Date:
Sun Nov 18 13:26:04 2012 +0000
Revision:
0:15c4766e3e16
flashe

Who changed what in which revision?

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