Iam trying to measure temperature with two Xbee-Pro 868 and Arduino Uno. I have LM35 temperature sensor connected with breadboard into router Xbee 5V, GND and DIO1 pins. I have connected coordinator Xbee into Arduino with this Xbee shield:
And these are the Xbees Iam using with wire antennas:
http://www.cooking-hacks.com/index.php/xbee-868-mhz-sma-module.html
This is the arduino code, which is quite similar to code used in this tutorial:
float temp;
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() >= 21) { // Make sure the frame is all there
if (Serial.read() == 0x7E) { // 7E is the start byte
for (int i = 1; i<19; i++) { // Skip ahead to the analog data
byte discardByte = Serial.read(); // Discard bytes we don't need
}
int analogMSB = Serial.read(); // Read the first analog byte data
int analogLSB = Serial.read(); // Read the second byte
int analogReading = analogLSB + (analogMSB * 256);
temp = analogReading / 10.0; // Convert analogreading into Celsius
Serial.print(temp);
Serial.println(" degrees C");
}
}
}
I have configured my Xbees with X-CTU. Their modem is XBP08-DP and function set is XBEE-PRO 868 SINGLE CHANNEL and version is 1061. Configurations are quite similar to factory settings (all configurations in attachments in text format).
Coordinator/baseradio configurations:
Changed PL = 0, AP = 2
Router configurations:
Changed PL = 0, AP = 2, AD1/DIO1 = 2, IR = 3E8
I have connected Arduino to computer with usb cable and Iam using this usb adapter with router xbee
http://www.aliexpress.com/item/20PCS-5V-1A-USB-EU-Plug-Travel-Wall-AC-Power-Wired-Charger-Adapter-For-Samsung-Galaxy/1002511071.html
This setup works fine with series 2 Xbee radios, but when I try with these Xbee-Pro 868 it is not working. I use arduino serial monitor to see the temperature, but when I open it Iam getting the same value (51.50 degrees C) all the time and it doesn’t react when I try to warm or cool the sensor. For sure it is at least sending something. I have tested the LM35 sensor and it is working.
Is there something wrong with my configurations?
What is the difference with these function settings in X-CTU:
XBEE-PRO 868 SINGLE CHANNEL
XBEE-PRO 868 SINGLE CHANNEL – 232 ADAPTER
XBEE-PRO 868 SINGLE CHANNEL – 485 ADAPTER
XBEE-PRO 868 SINGLE CHANNEL – AIO ADAPTER
XBEE-PRO 868 SINGLE CHANNEL – DIO ADAPTER
XBEE-PRO 868 SINGLE CHANNEL – USB ADAPTER
Is this Xbee-Pro 868 compatible with Arduino Uno or Xbee Shield or Xbee Explorer?
Xbee-Pro 868 radios require 500mA even up to 800mA. Xbee Explorer can give 500mA and Arduino Uno about 450mA, Iam not sure about Xbee Shield. Is this correct?
coordinator.txt (515 Bytes)
router.txt (517 Bytes)