satbir panesar
/
elec350
my library for elec350
Led.cpp
- Committer:
- spanesar
- Date:
- 2016-10-19
- Revision:
- 3:d62097c19a4e
- Parent:
- 1:8cd3ad6ab5f3
File content as of revision 3:d62097c19a4e:
#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; }