my library for elec350

Dependencies:   mbed

Committer:
spanesar
Date:
Wed Oct 19 20:33:20 2016 +0000
Revision:
3:d62097c19a4e
Parent:
1:8cd3ad6ab5f3
added microphone files;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spanesar 1:8cd3ad6ab5f3 1 #include "Led.h"
spanesar 1:8cd3ad6ab5f3 2
spanesar 1:8cd3ad6ab5f3 3 Led::Led(PinName pinName):
spanesar 1:8cd3ad6ab5f3 4 pin(pinName)
spanesar 1:8cd3ad6ab5f3 5 {
spanesar 1:8cd3ad6ab5f3 6 }
spanesar 1:8cd3ad6ab5f3 7 void Led::switchOn(){
spanesar 1:8cd3ad6ab5f3 8 this->pin = 1;
spanesar 1:8cd3ad6ab5f3 9 }
spanesar 1:8cd3ad6ab5f3 10 void Led::switchOff(){
spanesar 1:8cd3ad6ab5f3 11 this->pin = 0;
spanesar 1:8cd3ad6ab5f3 12 }
spanesar 1:8cd3ad6ab5f3 13 void Led::flash(float time){
spanesar 1:8cd3ad6ab5f3 14 this->pin = 1;
spanesar 1:8cd3ad6ab5f3 15 wait(time);
spanesar 1:8cd3ad6ab5f3 16 this->pin = 0;
spanesar 1:8cd3ad6ab5f3 17 }