S T / Mbed 2 deprecated 7segb

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
staka
Date:
Sat Nov 28 06:32:33 2009 +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 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);
+    }
+}
diff -r 000000000000 -r 1f5fdb2ffabd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Nov 28 06:32:33 2009 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/32af5db564d4