Matthew Pybus
/
talktoother
Diff: main.cpp
- Revision:
- 0:0d359c595390
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed May 01 14:57:16 2013 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); // tx, rx +DigitalOut led1(PTB8); +Serial other(PTD2, PTD3); + +int main() { +char c; +char d; + pc.printf("Hello World\n"); + while(1){ + c=pc.getc(); + d=PTD3; + other.printf("%c",c); + pc.printf("%c",d); + + led1=(~c); + + wait(0.1); + } +} \ No newline at end of file