XBEEs not communicating when connected to arduino

Hello, i am trying to make two xbees communicate with each other in Transperent mode. Each of the xbees is connected to Arduino (separate Arduino for individual XBee)through a 4 channel level converter. After uploading the sketches to the boards the serial monitor is blank with no output.
i configured one XBee as coordinator with pan id-1234,DH= 13200;DL =41A45C5D;Mac address=001320041A4652B;
The other xbee as router with panid - 1234;DH =13200 ;DL =41A4652B; Mac address=001320041A45C5D.All configured in XCTU software.The arduino code uploaded For xbee with mac address 001320041A45C5D. is the following in order to transmit

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop () {
  // put your main code here, to run repeatedly:
  Serial.print('T');
  delay(2000);
}

[/code]The arduino code uploaded for Xbee with mac address 001320041A4652B is the following to work as receiver

void setup() {
 Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial.available()){
    char Xbreceived = Serial.read();
    Serial.println(Xbreceived);
  }
}

Far outside my area of expertise but how do you communicate with the XBEEs from the Arduino? Your code only shows the use of Serial and you can't use Serial for both the XBee and the serial monitor.

Yeah I realized and used the software serial library for the arduino connected to the receiver XBee. Here is the code for the receiver.
//RECEIVER
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup() {
Serial.begin(9600);
mySerial.begin(9600);

}

void loop() {
// put your main code here, to run repeatedly:
if (mySerial.available())
Serial.write(mySerial.read());

}
But still the same issue persists, I get a blank serial monitor.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.