SONG BONG SOO
/
Xbee_Hello_world_A
example
Fork of Xbee_Hello_world_A by
main.cpp
- Committer:
- mdo131
- Date:
- 2017-11-03
- Revision:
- 1:114432971517
- Parent:
- 0:9cbddcc86466
File content as of revision 1:114432971517:
#include "mbed.h" #include "xbee.h" xbee xbee1(p9,p10,p11); //Initalise xbee_lib Serial pc(USBTX, USBRX); //Initalise PC serial comms int main() { char send_data[202]; //Xbee buffer size is 202 bytes char read_data[202]; //Xbee buffer size is 202 bytes while(1) { pc.scanf("%s",send_data); //Read data from serial console xbee1.SendData(send_data); //Send data to XBee xbee1.RecieveData(read_data,0); //Read data from the XBee pc.printf("You said:%s",read_data); } } //about xbee pro //https://os.mbed.com/components/Xbee-Pro/