Sending data from arduino+xbee shield+xbee to Xbee-PC (With X-CTU program)

Hi people! Im kinda new here, and in this area of arduino’s and XBee’s. What i’m trying to do is a circuit with 6 temperature sensors in 1 wire bus protocol using the DS18B20 Programmable Resolution 1-Wire Digital Thermometer. All this connected with Arduino Duemilanove+xbee shield+xbee 2 series (this will be my end device). The purpose of this work is to, send a message to another xbee in mode API (coordinator) connected to a PC with the X-CTU program to visualize in tab Terminal de incoming measurements of the circuit sensors. My problem is about how to program the arduino to do that. I allready have the code to get all of the six temperatures sensors connected to Arduino Duemilanove, that i pullout of the web and adjust to my circuit but, the part to send that temperatures through the XBee mounted on arduino i don’t know! I have to change the pin 3 in data to RX or TX or something like that?! Please help me out on this. And i have another problem in the libraries. When i put the XBee.h in the libraries folder of the program of arduino, when i’m programming he don’t recognize it! Can you say a solution to this and point me to a link to pullout a 100% right libray of xbee?
This is the part of the code that i allready have:
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

DeviceAddress sensor1 = {
0x28, 0x94, 0xE2, 0xDF, 0x02, 0x00, 0x00, 0xFE };
DeviceAddress sensor2 = {
0x28, 0x6B, 0xDF, 0xDF, 0x02, 0x00, 0x00, 0xC0 };
DeviceAddress sensor3 = {
0x28, 0x59, 0xBE, 0xDF, 0x02, 0x00, 0x00, 0x9F };
DeviceAddress sensor4 = {
0x28, 0x95, 0xE2, 0xDE, 0x02, 0x00, 0x00, 0xF0 };
DeviceAddress sensor5 = {
0x28, 0x66, 0xDF, 0xDE, 0x02, 0x00, 0x00, 0xCE };
DeviceAddress sensor6 = {
0x28, 0x56, 0xBE, 0xEF, 0x02, 0x00, 0x00, 0x9C };

void setup(void)
{
// start serial port
Serial.begin(9600);
// Start up the library
sensors.begin();
// set the resolution to 10 bit (good enough?)
sensors.setResolution(sensor1, 10);
sensors.setResolution(sensor2, 10);
sensors.setResolution(sensor3, 10);
sensors.setResolution(sensor4, 10);
sensors.setResolution(sensor5, 10);
sensors.setResolution(sensor6, 10);
}

void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print(“Error getting temperature”);
}
else {
Serial.print("C: “);
Serial.print(tempC);
Serial.print(” F: ");
Serial.print(DallasTemperature::toFahrenheit(tempC));
}
}

void loop(void)
{
delay(2000);
Serial.print(“Getting temperatures…\n\r”);
sensors.requestTemperatures();

Serial.print(“sensor1 temperature is: “);
printTemperature(sensor1);
Serial.print(”\n\r”);
Serial.print(“sensor2 temperature is: “);
printTemperature(sensor2);
Serial.print(”\n\r”);
Serial.print(“sensor3 temperature is: “);
printTemperature(sensor3);
Serial.print(”\n\r\n\r”);
Serial.print(“sensor4 temperature is: “);
printTemperature(sensor4);
Serial.print(”\n\r”);
Serial.print(“sensor5 temperature is: “);
printTemperature(sensor5);
Serial.print(”\n\r”);
Serial.print(“sensor6 temperature is: “);
printTemperature(sensor6);
Serial.print(”\n\r\n\r”);
}

Many thanks for the attention!

I'm not sure that I understand your problem. The XBee broadcasts, over the air, anything that is written to the serial port, and writes to the serial port anything that it receives over the air.

the part to send that temperatures through the XBee mounted on arduino i don't know!

That would be the Serial.print(), Serial.write(), and Serial.println() statements.

I have to change the pin 3 in data to RX or TX or something like that?

No. You don't need to change a thing. Except maybe the configuration of the XBees. Despite digi's claim that they don't need to be configured to work, they do.

When i put the XBee.h in the libraries folder of the program of arduino, when i'm programming he don't recognize it! Can you say a solution to this and point me to a link to pullout a 100% right libray of xbee?

Why do you need the XBee library? Where, exactly, are you putting the XBee.h file? Where is the XBee.cpp file that goes with it? Who is "he" that doesn't recognize something? What doesn't "he" recognize?

Exactly how/where to install a library depends on you operating system. I believe you forgot to mention that.

as far as i understand you are using the xbee coordinator in api mode.

is there any reason for doing that, if your xbee end device is connected to an Arduino?

i would begin with the normal AT mode for both xbees - coordinator AT and router AT (don't use an end device for testing). then simply send the data via the serial port like PaulS wrote. if that works you can continue (if it is really necessary) to program an end device or use the coordinator in API mode.

markbee

Thanks for the help! About:
—No. You don’t need to change a thing. Except maybe the configuration of the XBees. Despite digi’s claim that they don’t need to be configured to work, they do.
Answer: Yes, i didn’t know of that, because i thinked that, like digi said that doesn’t need programming.
—Why do you need the XBee library? Where, exactly, are you putting the XBee.h file? Where is the XBee.cpp file that goes with it? Who is “he” that doesn’t recognize something? What doesn’t “he” recognize?

Exactly how/where to install a library depends on you operating system. I believe you forgot to mention that.
Answer: I thought that i needed to put a library in the arduino programming because im using a xbee (End device) attached to send the temperature measurements to another XBee (Coordinator)

I don’t know how to creat the final part of the programming code of arduino to send, in a frame or API MESSAGE, the temperatures from pin 3, throught xbee shield and the XBee 2 series (router/end device) to another xbee 2 series (Coordinator).

Note that, my circuit to measure and send data is a arduino+xbee shield+xbee 2 series

Thanks markbee! I will try to do that, and post a reply here, when i have any results! thank you

hi guys!! Good news, i send a message through arduino+xbee to PC via usb+xbee! But now i don't know how to send my data (temperatures) separated in the AT message viewed in the X-CTU program... I need to define the number of bits the AT message have? like this: 7E 00 0F [10 01 00 00 00 00 00 00 FF FF FF FE 00 00 41 42 43 44 45 46 B2 => being that 41 42 43 44 45 46 is the values of the temperatures measured on pin 3. How could i define a message/code to send this type of message from arduino+xbee to PC-XBee? Thanks for the help!! =)