Library to use LED as a heartbeat. Powered using PWM.

Dependents:   ARM_DAY_PWM

Files at this revision

API Documentation at this revision

Comitter:
mbj898
Date:
Fri Nov 30 13:38:12 2012 +0000
Parent:
2:fc8dbf3231ee
Commit message:
final

Changed in this revision

HeartBeat.cpp Show annotated file Show diff for this revision Revisions of this file
HeartBeat.h Show annotated file Show diff for this revision Revisions of this file
--- a/HeartBeat.cpp	Thu Nov 29 14:12:25 2012 +0000
+++ b/HeartBeat.cpp	Fri Nov 30 13:38:12 2012 +0000
@@ -1,19 +1,11 @@
 #include "mbed.h"
 #include "HeartBeat.h"
 
-HeartBeat::HeartBeat(PinName ledPin, PinName pwm) : led(ledPin), pwmObject(pwm)
+HeartBeat::HeartBeat( PinName pwm) : pwmObject(pwm)
 {
-
-
 }
 
 
-void HeartBeat::turnOn()
-{
-    led = 1;
-
-}
-
 void HeartBeat::pwmIt(float frequency)
 {
     float delay = frequency /100;
--- a/HeartBeat.h	Thu Nov 29 14:12:25 2012 +0000
+++ b/HeartBeat.h	Fri Nov 30 13:38:12 2012 +0000
@@ -5,14 +5,11 @@
 
 public:
     //object creator method, call this to initialize a heartbeat object
-    HeartBeat(PinName light, PinName pwm);
-
-    void turnOn();
+    HeartBeat(PinName pwm);
+    
     void pwmIt(float frequency);
 
 private:
-
-    DigitalOut led;
     PwmOut pwmObject;
     
 };
\ No newline at end of file