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: MDMMLedparpadeante.cpp
- Revision:
- 1:9cf502184726
- Parent:
- 0:b7a5db8d5e22
diff -r b7a5db8d5e22 -r 9cf502184726 MDMMLedparpadeante.cpp --- a/MDMMLedparpadeante.cpp Wed Sep 01 17:52:16 2021 +0000 +++ b/MDMMLedparpadeante.cpp Wed Sep 01 18:06:03 2021 +0000 @@ -1,13 +1,26 @@ #include <mbed.h> DigitalOut LEDP (LED1); +DigitalIn btn (BUTTON1); int main (void) { while(1) { - LEDP=1; - wait(0.1); - LEDP=0; + if(btn==1) + { + LEDP=1; + wait(0.1); + LEDP=0; + wait(0.2); + } + else + { + LEDP=1; + wait(0.5); + LEDP=0; + wait(0.3); + } } } +