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: DebouncedIn mbed
Revision 2:e7f390d1e86c, committed 2016-06-14
- Comitter:
- SIT2016
- Date:
- Tue Jun 14 07:20:02 2016 +0000
- Parent:
- 1:3f6f29315707
- Commit message:
- Removed manual debonce
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jun 12 09:17:20 2016 +0000
+++ b/main.cpp Tue Jun 14 07:20:02 2016 +0000
@@ -7,14 +7,8 @@
int main() {
while(1) {
//using library directly
- /*if (button.rising()){ //execute only if rising edge detected on the button.
+ if (button.rising()){ //execute only if rising edge detected on the button.
led = !led;
- }*/
-
- //without library
- if(button == 0) { //detecting press
- led = !led;
- while(button==0); //empty while to wait while switch is pressed. hence toggling only once.
}
}
}