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.
Fork of BVBCET by
Revision 0:e88292a7e64c, committed 2015-11-25
- Comitter:
- adityap
- Date:
- Wed Nov 25 09:47:25 2015 +0000
- Commit message:
- Serial LED Blinking.
Changed in this revision
| Blink_Out.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Blink_Out.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r e88292a7e64c Blink_Out.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Blink_Out.cpp Wed Nov 25 09:47:25 2015 +0000
@@ -0,0 +1,13 @@
+#include "Blink_Out.h"
+#include "mbed.h"
+
+Blink_Out::Blink_Out(PinName pin) : number(pin) {
+ number = 0;
+}
+
+void Blink_Out::out(int n) {
+ for(int i=0; i<n*2; i++) {
+ number = !number;
+ wait(0.2);
+ }
+}
diff -r 000000000000 -r e88292a7e64c Blink_Out.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Blink_Out.h Wed Nov 25 09:47:25 2015 +0000
@@ -0,0 +1,19 @@
+#ifndef MBED_Blink_Out_H
+#define MBED_Blink_Out_H
+
+#include "mbed.h"
+
+class Blink_Out {
+public:
+ Blink_Out(PinName pin);
+ void out(int n);
+
+
+private:
+ DigitalOut number;
+
+};
+
+
+
+#endif
