![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
zzz
Dependencies: C12832_lcd ConfigFile LM75B WiflyInterface2 mbed-rtos mbed
Fork of Xbee_Hello_World_B by
main.cpp@0:122702c9168a, 2012-08-31 (annotated)
- Committer:
- tristanjph
- Date:
- Fri Aug 31 14:47:12 2012 +0000
- Revision:
- 0:122702c9168a
- Child:
- 1:15d917484a8d
initial commit
Who changed what in which revision?
User | Revision | Line number | New 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 | } |