![](/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
main.cpp
- Committer:
- Sander
- Date:
- 2010-12-10
- Revision:
- 0:b8914565f0af
File content as of revision 0:b8914565f0af:
#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; } }