This is a LED Demo for linknode

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Files at this revision

API Documentation at this revision

Comitter:
helloqi
Date:
Wed Apr 13 12:12:04 2016 +0000
Parent:
9:0d1a88e54782
Commit message:
LinkNode LED Demo

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Oct 29 12:28:39 2015 +0000
+++ b/main.cpp	Wed Apr 13 12:12:04 2016 +0000
@@ -1,12 +1,17 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut led_g(P0_19);
+DigitalOut led_r(P0_18);
 
-int main() {
-    while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+int main() 
+{
+    while(1) 
+    {
+        led_g = 1;
+        led_r = 0;
+        wait(1);
+        led_g = 0;
+        led_r = 1;
+        wait(1);
     }
 }