Reading data from xbee on Arduino IDE

Good day! I need a little help here friends, i need to read the data from my sensor wirelessly via xbee module. so my setup goes: hcsr04 connected to arduino and xbee, and arduino connected to xbee. I need to read the data from the sensor-arduino-xbee combination in the ARduino IDE serial monitor. If anyone can help me with this little problem, it will really be appreciated. Thank you!

I'm not sure what you've tried. It would help if you provided a little more info.

You might want to try using SoftwareSerial to communicate with the XBee on the "receiving" Arduino and then send the received characters to the standard serial port connected to your PC.

Check out the SoftwareSerial library examples, then do something like the following in a loop:

(mySerial is a SoftwareSerial connection) ... if (mySerial.available() > 0) { val =; Serial.write(val); } ...