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.
Diff: toggle.cpp
- Revision:
- 0:847ab1eb73cf
- Child:
- 1:27360e9dc2c5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/toggle.cpp Sat Jun 11 12:19:44 2016 +0000
@@ -0,0 +1,16 @@
+#include "toggle.h"
+#include "mbed.h"
+
+
+Togglen::Togglen(PinName pin) : _p(pin)
+{
+ _p = 0;
+}
+
+void Togglen::Toggle(int n)
+{
+ for(int i=0; i<n*2; i++) {
+ _p = !_p;
+ wait(0.2);
+ }
+}
\ No newline at end of file