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.
Dependencies: MMA8451Q8b SLCD mbed
Fork of KL46z_single_tap_2017 by
Revision 0:912303e63cbd, committed 2014-02-21
- Comitter:
- bcostm
- Date:
- Fri Feb 21 12:53:03 2014 +0000
- Child:
- 1:65b0e488f02a
- Commit message:
- Initial version.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Feb 21 12:53:03 2014 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+
+InterruptIn mybutton(USER_BUTTON);
+DigitalOut myled(LED1);
+
+float delay = 1.0; // 1 sec
+
+void pressed()
+{
+ if (delay == 1.0)
+ delay = 0.2; // 200 ms
+ else
+ delay = 1.0; // 1 sec
+}
+
+int main()
+{
+ mybutton.fall(&pressed);
+ while (1) {
+ myled = !myled;
+ wait(delay);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Feb 21 12:53:03 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/ed8466a608b4 \ No newline at end of file
