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: main.cpp
- Revision:
- 2:9ab3eb98ce0d
- Parent:
- 1:b903d66801e3
--- a/main.cpp Wed Aug 25 20:11:08 2021 +0000
+++ b/main.cpp Wed Aug 25 20:32:38 2021 +0000
@@ -1,7 +1,21 @@
#include <mbed.h>
+DigitalOut myled(LED1);
+DigitalIn btn(BUTTON1);
int main (void)
{
-
+ while(1){
+ if(btn == 0){
+ myled = 1;
+ wait(0.1);
+ myled = 0;
+ wait(0.1);
+ }else{
+ myled = 1;
+ wait(0.2);
+ myled = 0;
+ wait(0.5);
+ }
+ }
}
\ No newline at end of file