Fábio Souza
/
KL46Z_EX1_1
Example 1.1 Hands on KL46z
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); } }