PaulS,
Thank you for our reply.
Here is the code I am using for the Router with one Analog input.
#include <SoftwareSerial.h>
#include <Bridge.h>
SoftwareSerial mySerial(10, 11);
void setup() {
Bridge.begin();
Console.begin();
mySerial.begin(9600);
}
void loop() {
if (mySerial.available() >=22){
if (mySerial.read() == 0x7E){
Console.print("7E, ");
for(int i=1;i<19;i++){
byte discardByte = mySerial.read();
Console.print(discardByte,HEX);
Console.print(", ");
}
int analogMSB = mySerial.read();
Console.print("MSB, ");
int analogLSB = mySerial.read();
Console.print("LSB, ");
int chkSum = mySerial.read();
Console.print("ChkSum");
Console.println();
}
}
}
The coordinator( when connected to XCTU) has the proper Frame type 92 coming in with correct data.
This is what the Console displays:
Unable to connect: retrying (1)... connected!
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, 0, 2, 8A, D, 68, 7E, MSB, LSB, ChkSum
It appears that the repeating 6 byte sequence is a "Modem Status" frame.The other thing that I don't understand is the data displayed on the Console is refreshing about every 8 seconds but I set the sample rate of the Router to 5 seconds.
I am new to XBee and admit I do not have a complete understaning of the device but I have tried to sort this problem for several days and I am still baffled.
Thanks.
Regards,
Mike M