Simple straight forward program to write 16 digital pins and read 8 digital pins through UART

Dependencies:   mbed

Revision:
0:b8914565f0af
diff -r 000000000000 -r b8914565f0af main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 10 09:10:19 2010 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+ 
+BusOut myled(LED1, LED2, LED3, LED4);
+BusOut Dout(p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20);
+BusIn  Din(p21,p22,p23,p24,p25,p26,p27,p28,p29,p30);
+
+int main() {
+unsigned long DataIn=0;
+    while(1) {
+        unsigned long SetValue;
+        scanf("%u", &SetValue);
+        DataIn = Din;
+        printf("%u\t%u\n", DataIn, SetValue);
+        myled = SetValue;
+        Dout = SetValue;        
+    }
+}