DigitalOut & BusOut test with LED1~4

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Bongjun
Date:
Fri Jun 27 00:19:35 2014 +0000
Commit message:
DigitalOut & BusOut test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 0631d5c7c892 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 27 00:19:35 2014 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);    // Configure LED1 pin as output
+BusOut leds(LED2, LED3, LED4);
+
+int main() {
+    uint8_t count = 0;
+    while(1) {
+        if ((count % 10)==0) led1 = !led1; // every count is 10, led1 is blinking.
+        leds = count++;
+        wait(1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 0631d5c7c892 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 27 00:19:35 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file