mini code pour xbee
Dependencies: mbed ConfigFile EthernetInterface WebSocketClient mbed-rtos
Fork of app4Coordo by
Diff: main.cpp
- Revision:
- 0:ed0e18b7fa30
- Child:
- 1:568707763458
diff -r 000000000000 -r ed0e18b7fa30 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Feb 22 19:12:17 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalOut reset(p8); +Serial pc(USBTX, USBRX); +Serial xbee(p13, p14); + +int main() +{ + reset = 0; + while(1) + { + if(xbee.readable()) + { + pc.putc(xbee.getc()); + } + if(pc.readable()) + { + xbee.putc(pc.getc()); + } + } +}