This is a sample program which shows how to use my library XBeeGetRssi.
Dependencies: XBeeGetRssi mbed
Revision 5:85070c3bfc6a, committed 2013-09-03
- Comitter:
- ATKINZ117
- Date:
- Tue Sep 03 07:04:53 2013 +0000
- Parent:
- 4:f38df169d56f
- Child:
- 6:af32170b76c2
- Commit message:
- changed to return rssi value as int.
Changed in this revision
XBeeGetRssi.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/XBeeGetRssi.lib Wed Aug 28 08:57:45 2013 +0000 +++ b/XBeeGetRssi.lib Tue Sep 03 07:04:53 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/ATKINZ117/code/XBeeGetRssi/#ecd033d3e211 +http://mbed.org/users/ATKINZ117/code/XBeeGetRssi/#7ec2a4147b44
--- a/main.cpp Wed Aug 28 08:57:45 2013 +0000 +++ b/main.cpp Tue Sep 03 07:04:53 2013 +0000 @@ -3,15 +3,18 @@ XBeeGetRssi RSSI(p9,p10); //tx,rx Serial pc(USBTX,USBRX); -char* ptr; +//char* ptr; +int rssi; //Serial MyXbee(p13,p14); int main(){ while(1){ - ptr=RSSI.getRssi(); + //ptr=RSSI.getRssi(); + rssi=RSSI.getRssi(); - pc.printf("RSSI:-%c%cdBm\r\n",*ptr,*(ptr+1)); + //pc.printf("RSSI:-%c%cdBm\r\n",*ptr,*(ptr+1)); + pc.printf("RSSI:%ddBm\r\n",rssi); } }