![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is a sample program which shows how to use my library XBeeGetRssi.
Dependencies: XBeeGetRssi mbed
main.cpp
- Committer:
- ATKINZ117
- Date:
- 2013-08-27
- Revision:
- 3:bc4f426b4f98
- Parent:
- 2:eb9a9348fc24
- Child:
- 4:f38df169d56f
File content as of revision 3:bc4f426b4f98:
#include "mbed.h" #include "XBeeGetRssi.h" XBeeGetRssi RSSI(p9,p10); //tx,rx Serial pc(USBTX,USBRX); char* ptr; //Serial MyXbee(p13,p14); int main(){ while(1){ // pc.printf("RSSI: - %s dBm \r\n",RSSI.get()); ptr=RSSI.getRssi(); pc.printf("RSSI: - "); /*for(int i=1;i<4;i++){ pc.printf("%c",RSSI.getRssi(i)); }*/ //pc.printf("%c",RSSI.getRssi(0)); //pc.printf("%c",RSSI.getRssi(1)); //pc.printf("%c",RSSI.getRssi(2)); //pc.printf("%c",RSSI.getRssi(3)); //pc.printf("%c",RSSI.getRssi(4)); //pc.printf("%c",RSSI.getRssi(5)); //pc.printf("%c",RSSI.getRssi(6)); pc.printf("%c%c",*ptr,*(ptr+1)); //pc.printf("%c",RSSI.getRssi()); pc.printf("dBm \r\n"); // pc.printf("\r\n"); pc.printf("This is the end of main.\r\n"); } }