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

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Sander
Date:
Fri Dec 10 09:10:19 2010 +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
--- /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;        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 10 09:10:19 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e