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
Diff: main.cpp
- Revision:
- 3:e5bb6ffbeef8
- Parent:
- 2:ce0c9da29c7d
- Child:
- 4:d29a2f6f9b0e
--- a/main.cpp Tue Aug 29 11:09:03 2017 +0000
+++ b/main.cpp Tue Aug 29 11:31:09 2017 +0000
@@ -1,10 +1,12 @@
#include "mbed.h"
DigitalOut ledExt1(p21), led2(LED2), led3(LED3), ledExt4(p24);
-
+DigitalIn b1(p13);
int main() {
- while(1) {
+ if (b1 == 1)
+ {
+ while(1) {
ledExt1 = 1;
wait(1.0);
led2 = 1;
@@ -18,5 +20,6 @@
wait(2.0);
ledExt1 = led2 = led3 = ledExt4 = 0;
wait(0.1);
+ }
}
}
\ No newline at end of file