wireless Temperature and humadity using Xbee + arduino uno

I have 2-Xbee's Series 1
I-Arduino Uno
1-Xbee shield
1-Xbee explorer
1- DHT 11 sensor temperature and humadity

more or less like this : PC commputer --> xbee + xbee explorer <----------> xbee +xbee Shield + sensor DHT 11 +arduino UNO

I would like to see temperature values pop up on the serial monitor while using wireless communication. The temperature sensor is connected to the Xbee shield ,which is connected to the Arduino Uno. I then have the Xbee explorer attached to an Xbee connected to the computer. I can get values to show up on the serial monitor if I connect the Arduino Uno directly to the computer but not when using wireless communication.. Please help, i'am newbie learning xbee and i very confused
here this code :

#include "DHT.h"

#define DHTPIN 2    


#define DHTTYPE DHT11   // DHT 11 


DHT dht(DHTPIN, DHTTYPE);

int ledPin = 13; // LED connected to digital pin
int transistorPin = 12;

void setup()  {
   pinMode(ledPin, OUTPUT); // sets the digital pin as output
   pinMode(transistorPin, OUTPUT);

 blinkLED(ledPin, 2, 500); // startup blink
   delay(1000);
   Serial.begin(9600); 
    Serial.println("DHTxx test!");
 
  dht.begin();// start serial at 19200 baud, same as programmer speed
   }

void loop()  {
   blinkLED(ledPin, 1, 250);

  float h = dht.readHumidity();
  float t = dht.readTemperature();

  
  if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.print("Humidity: "); 
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: "); 
    Serial.print(t);
    Serial.println(" *C");
  }
 if ( Serial.available() > 0) { // if there are bytes waiting on the serial port
   char inByte = Serial.read(); // read a byte
   if (inByte == '*') { // if that byte is the desired character
   int len = 5; // expected string is 6 bytes long
   char inString[len]; // declare string variable
   for (int i = 0; i < len; i++) {
   inString[i] = Serial.read();
 }
   if ( strstr(inString, "reset") != NULL ) // check to see if the respose is "reset"
     resetChip(5000); // reset the chip after waiting for the specified # of milliseconds
   }
  }
}
 					  

void resetChip(int delayTime) {
   /* if the project does not typically receive data, and accidental chip resets are tolerable,
   * this is a simple method that should work just fine. Otherwise it is recommended that the 
   * reset request string be part of a call-response sequence, be transmitted with a
   * reserved byte or byte string, or be transmitted in some way out of band, so that it is not 
   * accidentally received.
   */
   Serial.print("\nArduino will reset in ");
   Serial.print(delayTime/1000, DEC);
   Serial.print(" seconds...\n\r");
   blinkLED(ledPin, delayTime/100, 100); // wait for the specified amount of time, doing nothing
   Serial.print("\nResetting NOW.\n\r");
   digitalWrite(transistorPin, HIGH); // switch on a transistor that pulls the chip's reset pin to ground
}
 					  

void blinkLED(int targetPin, int numBlinks, int blinkRate) {
   // this function blinks the an LED light as many times as requested
   for (int i=0; i<numBlinks; i++) {
    digitalWrite(targetPin, HIGH); // sets the LED on
    delay(blinkRate); // waits for a second
    digitalWrite(targetPin, LOW); // sets the LED off
    delay(blinkRate);
   }
}

please help me,, thank's

The Xbee and serial monitor both need the same I/O pins on the Arduino Uno to communicate, so you can can't use both at the same time. You might be better of with a Leonardo since it doesn't use the I/O pins to communicate with the serial monitor.

The Xbee and serial monitor both need the same I/O pins on the Arduino Uno to communicate

But, the Arduino is communicating only with one XBee while the other XBee is communicating only with the PC, using the serial port hardware. So, the setup is fine.

OP: How did you configure the XBees? Using X-CTU, you need to set PAN ID, MY and DL for both XBees. PAN ID needs to be the same on both XBees, while MY on one needs to be DL on the other. The exact values do not matter, as long as the value is not 0 or 0xFFFF.

PaulS:
But, the Arduino is communicating only with one XBee while the other XBee is communicating only with the PC, using the serial port hardware. So, the setup is fine.

I can get values to show up on the serial monitor if I connect the Arduino Uno directly to the computer but not when using wireless communication

He says he's plugging the UNO into his computer and trying to see the temperature values on the serial monitor. So I think his setup is really like this:

PC --> xbee + xbee explorer <----------> xbee +xbee Shield + sensor DHT 11 +arduino UNO --> PC

He says he's plugging the UNO into his computer and trying to see the temperature values on the serial monitor. So I think his setup is really like this:

But, that's not what OP wants, so I think the problem is that the two XBees are not configured to talk to each other.

A while ago I created a couple sketches to setup one xbee as a transmitter and another as a receiver. Attached are the sketches and X-CTU config files for each. If you can't get your sketch working, you might try these, just to get them talking.

XBee_Test.zip (5.11 KB)

i mean i will make the same project with project in this video, but in terminal X-CTU in the PC does not look readings of temperature and humidity,just X-CTU in PC connected with arduino + xbee+ dht 11, i'am sorry my english bad.. :~

ScottG:
A while ago I created a couple sketches to setup one xbee as a transmitter and another as a receiver. Attached are the sketches and X-CTU config files for each. If you can't get your sketch working, you might try these, just to get them talking.

i see that you used 2 program and 2 config for the x-ctu, and now we got another problem communicate with the modem in xbee (not because your config)...
at first we try to do some setting in modem configuration, we try to set the I/O setting on D7 and D6 to be CTS and RTS FLOW CONTROL and then we could not even configuring it now...
i really dont have any idea what is wrong with it