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.
Dependencies: mbed 4DGL-uLCD-SE xbee_lib
main.cpp@1:28c8542ecadf, 2020-04-10 (annotated)
- Committer:
- pimani
- Date:
- Fri Apr 10 15:32:09 2020 +0000
- Revision:
- 1:28c8542ecadf
- Parent:
- 0:122702c9168a
Receiver codes
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 | } |