Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:654a22520c76, committed 2012-11-30
- 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
