Analog comms with xbee. Program for the Coordinator.

Dependencies:   C12832_lcd mbed xbeeLibDannelly

Fork of Xbee_Hello_World_B by Tristan Hughes

Committer:
tristanjph
Date:
Fri Aug 31 14:47:12 2012 +0000
Revision:
0:122702c9168a
Child:
1:4ce1378831fe
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tristanjph 0:122702c9168a 1 #include "mbed.h"
tristanjph 0:122702c9168a 2 #include "xbee.h"
tristanjph 0:122702c9168a 3
tristanjph 0:122702c9168a 4 xbee xbee1(p9,p10,p11); //Initalise xbee_lib
tristanjph 0:122702c9168a 5
tristanjph 0:122702c9168a 6 int main()
tristanjph 0:122702c9168a 7 {
tristanjph 0:122702c9168a 8 char read_data[202]; //Xbee buffer size is 202 bytes
tristanjph 0:122702c9168a 9
tristanjph 0:122702c9168a 10 while(1) {
tristanjph 0:122702c9168a 11 xbee1.RecieveData(read_data,0); //Read data from the XBee
tristanjph 0:122702c9168a 12 xbee1.SendData(read_data); //Send data to XBee
tristanjph 0:122702c9168a 13 }
tristanjph 0:122702c9168a 14 }