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 switchcount by
Diff: main.cpp
- Revision:
- 0:af296e7fa008
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jun 06 09:32:36 2013 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+DigitalOut myled1(LED1);
+DigitalIn myswitch(p20);
+int i=1;
+int main() {
+ while(1)
+ {
+ if(myswitch==1)
+ {
+ wait(0.5);
+ if(i==10)
+ {
+ myled1 = 1;
+ wait(3);
+ i=0;
+ myled1 = 0;
+ }
+ i++;
+ }
+ }
+}
\ No newline at end of file
