Juraj Babić / Blinker
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Blinker.cpp Source File

Blinker.cpp

00001 #include "mbed.h"
00002 #include "Blinker.h"
00003 
00004 Blinker::Blinker(PinName pin):led(pin){
00005     led = 0;
00006     }
00007     
00008     void Blinker::blink(int n, float p){
00009         for (int i = 0; i < n; i++){
00010             led = 1;
00011             wait(p/2);
00012             led = 0;
00013             wait(p/2);
00014             }
00015         }