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: mbed SDFileSystem
Diff: 01_Basics/Button_Interrupt.cpp
- Revision:
- 1:9a043ee174de
- Parent:
- 0:b471f7764d46
- Child:
- 2:17a5c34b3a79
--- a/01_Basics/Button_Interrupt.cpp Thu Jul 04 11:04:42 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-
-#ifdef COMPILE_Button_Interrupt
-
-
-InterruptIn button(USER_BUTTON);
-
-DigitalOut led(LED1);
-
-double delay = 0.5; // 500 ms
-
-void pressed()
-{
- delay = 0.1; // 100 ms
-}
-
-void released()
-{
- delay = 0.5; // 500 ms
-}
-
-int main()
-{
- // Assign functions to button
- button.fall(&pressed);
- button.rise(&released);
-
- while (1) {
- led = !led;
- wait(delay);
- }
-}
-
-#endif
\ No newline at end of file