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 0:a293484a4f43, committed 2016-12-15
- Comitter:
- mcica
- Date:
- Thu Dec 15 12:21:18 2016 +0000
- Commit message:
- proba
Changed in this revision
Blinker.cpp | Show annotated file Show diff for this revision Revisions of this file |
Blinker.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r a293484a4f43 Blinker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Blinker.cpp Thu Dec 15 12:21:18 2016 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "Blinker.h" + +Blinker::Blinker (PinName pin):led(pin) { + led=0; + } + void Blinker::blink(int n,float period){ + for (int i=0; i<n; i++){ + led1=1; + wait(period/2); + led=0; + wait(period/2); + } + } \ No newline at end of file
diff -r 000000000000 -r a293484a4f43 Blinker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Blinker.h Thu Dec 15 12:21:18 2016 +0000 @@ -0,0 +1,10 @@ +#include "mbed.h" +include "Blinker.h" + +class Blinker { + public: + Blinker(PinName pin); + void blink(int,float); + private: + DigitalOut led; +} \ No newline at end of file