Hi Folks,
I have just started experimenting with Xbee radios and I have hit the wall. Here, is my project story.
I am trying to receive Temperature and Humidity data from remote
- XBee-S2 (Router AT)
- Connected with DHT22 (on pin AD0)
- For level shifting I have connected 1k resistor from PIN-2 to PIN-1
Coordinator:
- Arduino UNO
- XBee S2 (Setup as Coordinator API)
- Pins connected
XBee TX to Arduino RX
XBee RX to Arduino TX
Code on receiver side (simple)
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available()>=21){
for(int i=0;i<26;i++){
Serial.print(Serial.read(),HEX);
Serial.print(“-”);
}
Serial.print(“,”);
Serial.println();
}
}
The output that I receive on Ardunio IDE Serial Monitor is :
7E-0-12-92-0-13-A2-0-40-F9-69-94-A-4F-1-1-0-1-0-0-1-FFFFFFFF-FFFFFFFF-25-FFFFFFFF-FFFFFFFF-,
7E-0-12-92-0-13-A2-0-40-F9-69-94-A-4F-1-1-0-1-0-0-1-FFFFFFFF-FFFFFFFF-25-FFFFFFFF-FFFFFFFF-,
7E-0-12-92-0-13-A2-0-40-F9-69-94-A-4F-1-1-0-1-0-0-1-FFFFFFFF-FFFFFFFF-25-FFFFFFFF-FFFFFFFF-,
Questions:
- The first 20 bytes, they are correct and I understood what they are
- From 21st byte, I am not sure what and why they are as displayed
Appreciate your help and guidance.
- Vijay