Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "xbee.h" 00003 00004 xbee xbee1(p9,p10,p11); //Initalise xbee_lib 00005 Serial pc(USBTX, USBRX); //Initalise PC serial comms 00006 00007 int main() 00008 { 00009 char send_data[202]; //Xbee buffer size is 202 bytes 00010 char read_data[202]; //Xbee buffer size is 202 bytes 00011 00012 while(1) { 00013 pc.scanf("%s",send_data); //Read data from serial console 00014 xbee1.SendData(send_data); //Send data to XBee 00015 xbee1.RecieveData(read_data,0); //Read data from the XBee 00016 pc.printf("You said:%s",read_data); 00017 } 00018 }
Generated on Tue Jul 12 2022 16:35:00 by
