Tristan Hughes
/
Xbee_Hello_World_B
Hello world program showing use of xbee-lib. Receiver program, just returns data sent to it.
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "xbee.h" 00003 00004 xbee xbee1(p9,p10,p11); //Initalise xbee_lib 00005 00006 int main() 00007 { 00008 char read_data[202]; //Xbee buffer size is 202 bytes 00009 00010 while(1) { 00011 xbee1.RecieveData(read_data,0); //Read data from the XBee 00012 xbee1.SendData(read_data); //Send data to XBee 00013 } 00014 }
Generated on Tue Jul 12 2022 16:35:00 by 1.7.2