Yifei Li / Mbed 2 deprecated test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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;
     }
 }