Biblioteka Flasher koda

Dependents:   Mikroupravljaci_vjezba_flasher

Committer:
djdinko
Date:
Fri May 22 17:21:29 2015 +0000
Revision:
0:87793af99c3b
TVZ library "Flasher"

Who changed what in which revision?

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