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 Minor_test_serial by
Revision 1:818181baae41, committed 2016-09-12
- Comitter:
- s1588796
- Date:
- Mon Sep 12 09:58:17 2016 +0000
- Parent:
- 0:c8f15874531b
- Commit message:
- Hi ;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c8f15874531b -r 818181baae41 main.cpp --- a/main.cpp Wed Sep 02 14:50:46 2015 +0000 +++ b/main.cpp Mon Sep 12 09:58:17 2016 +0000 @@ -1,7 +1,9 @@ #include "mbed.h" #include "MODSERIAL.h" -DigitalOut myled(LED_GREEN); +DigitalOut led1(LED_GREEN); +DigitalOut led2(LED_RED); +DigitalOut led3(LED_BLUE); MODSERIAL pc(USBTX, USBRX); int main() @@ -12,8 +14,12 @@ while (true) { wait(0.5f); // wait a small period of time - pc.printf("%d \n", i); // print the value of variable i i++; // increment the variable - myled = !myled; // toggle a led + led1 = !led1; // toggle a led + wait(0.1f); + led2 = !led2; + wait(0.1f); + led3 = !led3; + wait(0.1f); } }