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.
Revision 1:f0543338c25a, committed 2018-01-07
- Comitter:
- workingyifei
- Date:
- Sun Jan 07 05:07:22 2018 +0000
- Parent:
- 0:aacbb0060c5c
- Commit message:
- three LEDS flash one at at time;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jan 07 02:42:41 2018 +0000 +++ b/main.cpp Sun Jan 07 05:07:22 2018 +0000 @@ -1,14 +1,17 @@ #include "mbed.h" +DigitalOut led3(LED3); DigitalOut led2(LED2); DigitalOut led1(LED1); // main() runs in its own thread in the OS int main() { while (true) { + led1 = !led1; + wait(0.5); led2 = !led2; wait(0.5); - led1 = !led1; + led3 = !led3; } }