Hello Everyone
I tried to get rssi value with the help of microcontroller....this is my code
#include <SoftwareSerial.h>
uint8_t ssRX = 8;
// Connect Arduino pin 9 to RX of usb-serial device
uint8_t ssTX = 9;
// Remember to connect all devices to a common Ground: XBee, Arduino and USB-Serial device
SoftwareSerial nss(ssRX, ssTX);
char inputString[20] = ""; // a string to hold incoming data
boolean stringComplete = false;
static int i=0;
void setup() {
Serial.begin(9600);
nss.begin(9600);
}
void loop()
{
nss.print("Hello");
Serial.print("Hello");
delay(2000);
Serial.print("+++");
delay(2000);
//if(!strcmp(inputString,"OK"))
//{
i=0;
inputString[0]='\0';
Serial.println("ATDB\n");
i=0;
inputString[0]='\0';
Serial.println("ATMY\n");
i=0;
inputString[0]='\0';
Serial.println("ATDL\n");
//}
delay(5000);
nss.print("work");
Serial.print("work");
Serial.print(inputString);
delay(2000);
//delay(5000);
//Serial.print("bye");
}
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// add it to the inputString:
inputString [i]= inChar;
i++;
nss.print(inChar);
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
stringComplete = true;
}
}
it is always showing me these value for software serial
HelloworkOK
OK
OK
OK
HelloworkOK
OK
OK
OK
i guess it shud show me some value for rssi---atleast 0 or some value for ATMY or ATDH.....
i am using only arduino uno and one xbees1......
plz help me ....