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.
Fork of wim_eva_stm32f1_board_support by
Revision 58:8461647d7e85, committed 2018-01-19
- Comitter:
- aafanasj
- Date:
- Fri Jan 19 23:48:16 2018 +0000
- Parent:
- 57:98afe5d5ae5c
- Commit message:
- First Demo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Jan 18 12:45:02 2018 +0000 +++ b/main.cpp Fri Jan 19 23:48:16 2018 +0000 @@ -1,11 +1,25 @@ #include "mbed.h" DigitalOut led1(LED1); +DigitalOut led2(LED2); +DigitalOut led3(LED3); // main() runs in its own thread in the OS int main() { while (true) { - led1 = !led1; + led1.write(1); + led2.write(0); + led3.write(0); + wait(0.5); + + led1.write(0); + led2.write(1); + led3.write(0); + wait(0.5); + + led1.write(0); + led2.write(0); + led3.write(1); wait(0.5); } }