my library for elec350

Dependencies:   mbed

Led.cpp

Committer:
spanesar
Date:
2016-10-06
Revision:
1:8cd3ad6ab5f3

File content as of revision 1:8cd3ad6ab5f3:

#include "Led.h"

Led::Led(PinName pinName):
pin(pinName)
{
}
void Led::switchOn(){
    this->pin = 1;
    }
void Led::switchOff(){
    this->pin = 0;
    }
void Led::flash(float time){
    this->pin = 1;
    wait(time);
    this->pin = 0;
    }