Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
stueckler
Date:
Thu Mar 05 13:50:45 2015 +0000
Commit message:

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 a3397072a841 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 05 13:50:45 2015 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+// LED1 und LED2 abwechselnd mit LED3 und LED4 alle 0.5 optimiert
+
+BusOut myled(LED1,LED2,LED3,LED4);  // 4 Leitungen (Pins) LED1..4 zu einem
+                                    // Anschluß (Port) verbinden.
+                                    // Bis zu 16 Pins pro Port möglich
+
+int main() {
+    bool wechseln=true;             // Zustand verwalten
+    while(1) {
+        if (wechseln)
+            myled = 0x03;           // Bit 0 und 1 setzen (0x...Hexadezimal)
+        else
+            myled = 0x0c;           // Bit 2 und 3 setzen (4+8=12d=0ch)
+          
+        wechseln = !wechseln;       // Zustand wechsen    
+        wait(0.5);
+    }
+}
diff -r 000000000000 -r a3397072a841 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 05 13:50:45 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7e07b6fb45cf
\ No newline at end of file