![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple straight forward program to write 16 digital pins and read 8 digital pins through UART
Revision 0:b8914565f0af, committed 2010-12-10
- 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 |
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; + } +}
diff -r 000000000000 -r b8914565f0af mbed.bld --- /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