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 CPBR_KL46Z_EX1 by
Revision 1:a0616625d950, committed 2017-05-19
- Comitter:
- FBSEletronica
- Date:
- Fri May 19 21:08:48 2017 +0000
- Parent:
- 0:5a790410a276
- Commit message:
- Example 1.1 Hands on KL46z
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5a790410a276 -r a0616625d950 main.cpp --- a/main.cpp Tue Jan 31 18:57:24 2017 +0000 +++ b/main.cpp Fri May 19 21:08:48 2017 +0000 @@ -1,14 +1,15 @@ #include "mbed.h" DigitalOut led_green(LED1); - +DigitalOut led_red(LED2); int main() { + led_green = 0; + led_red = 1; while (true) { - led_green = 1; - wait(0.5); - led_green = 0; - wait(0.5); + led_green = !led_green; + led_red = !led_red; + wait(0.2); } }