S T / Mbed 2 deprecated 7segb

Dependencies:   mbed

Revision:
0:1f5fdb2ffabd
diff -r 000000000000 -r 1f5fdb2ffabd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Nov 28 06:32:33 2009 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+
+BusOut Seg7(p5, p6, p7, p8, p9, p10, p11, p12);
+int SegChars[] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 
+    0x77, 0x7c, 0x39, 0x5e, 0x79, 0x71 };
+int count;
+
+int main() {
+    while(1) {
+        Seg7 = SegChars[(count++)%16 ];
+        Seg7 = ~Seg7; // comment out for comon cathode, only for common anode
+        wait(0.3);
+    }
+}