XBee with Arduino Micro

Hi all,
I have two XBee 2 modules and two Arduino Micro modules. I am trying to have the two Micros communicate with each other via XBee. Right now, I have one XBee in Coordinator AT mode and the other in Router AT mode. I am able to send serial data between the two modules when they are hooked up to computers with serial terminal programs. In case it matters, one computer is a Windows using XCTU and the other is a Mac using CoolTerm.
I know that XBee cannot handle the 5V logic of Arduino, so I am outputting my TX and RX signals from Arduino to a logic level converter that should change the signals from 5V to 3.3V.
Also, I read that there might be issues with the dedicated TX and RX pins on the board, so I am using a SoftwareSerial configuration to send serial data to the XBee, with RX on pin 8 and TX on pin 9.
Finally, when I try one Arduino Micro, Level Converter, XBee setup and one bee connected to my Windows via XCTU, I can see that the two XBees have established a network connection, even though I cannot get them to send signals to each other.

My goal is to have these two Arduinos running off of battery power, but right now, I am trying to debug in various fashions, and none have yielded positive results. Anyone have any tips? This has been driving me mad for days now.

Hello, I'm having the same problem. Did you solve it?

The Xbees communicate perfectly connected to the computer and it also works when I change the Arduino Micro for an Arduino UNO using the same wiring and code.

I feed the XBee with the 3.3V pin of the Arduinos and use a voltage divider for the TX signal from the Arduino, should I do the same with the RX signal?

I'm also using Software Serial for the same reasons, but nothing seems to work.

What is bugging me is the fact that it works perfectly with the Arduino UNO, I don't understand why.

This is the simple code I'm using to test this

int LED = 13;

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 9); //RX, TX

void setup() {
pinMode(LED, OUTPUT);
Serial.begin(9600);
while (!Serial){
  ;
  }

mySerial.begin(9600);



}

void loop() {
 digitalWrite(LED, LOW);
 delay(1000);
mySerial.print('D');
 digitalWrite(LED, HIGH);
 delay(1000);
}

The XBee hooked to the Arduino just sends a 'D' and it's picked up by the Xbee hooked to the computer by an Explorer USB and I see it through a terminal program. As I said before it only fails with the Arduino Micro so it must be something special about it.

If anyone can help I will be very grateful. Thanks in advance for your time!!!

Hey I found the solution!!! It was in the code, you have to begin the SoftSerial before the while(!Serial).

int LED = 13;

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 9); //RX, TX

void setup() {
pinMode(LED, OUTPUT);
Serial.begin(9600);
mySerial.begin(9600);
while (!Serial){
  ;
  }




}

void loop() {
 digitalWrite(LED, LOW);
 delay(1000);
mySerial.print('D');
 digitalWrite(LED, HIGH);
 delay(1000);
}

Sometimes the silliest things are responsible for the biggest headaches haha. That's it, hope it solves your problem too.

Best regards

So, I am having a problem getting my Micro to send data to my XBee Pro S2. It receives data fine using Serial1 (pins 0 and 1). No problems receiving API formatted frames and displaying the contents on the serial monitor using Serial (USB).

However, when I go to send something nothing happens. No Red transmission light on the Xbee. I am using a voltage divider (three 3.4k ohm resistors...it's what I have to hand) to step down the voltage. I have looked on my oscilloscope and appears that the Micro is sending a packet to the Xbee but nothing happens. I have tried changing pins and using SoftSerial...nothing seems to work (and I know the Xbee is fine...I can use it with another Arduino).

Is there something special I need to know about using a voltage splitter (I recognise there are better ways of stepping down the voltage but surely it should work).