Arduino Mega 2560 + Xbee Shield + WifiBee + WiflyHQ = ERROR!

I think a write the post in the wrong department...

Please read the topic: Arduino Mega 2560 + Xbee Shield + WifiBee + WiflyHQ = ERROR! - Programming Questions - Arduino Forum

There is no way to connect it!!! :fearful:

and i dont know what to do any more. :frowning:

thanx a lot for your help.


Even though my issue was with the board I was using, here is the code you requested from my issue:

// state of received data compared to expected 
boolean startState = false;
// stores incoming data
String response = String("");
// data compare 
String expected = String("START");

void setup() {
  // begin xbee com

void loop() {
  // loops through checking received buffer for new data to compare to expected
       while(response.length() < expected.length()) {
         response += (char);
       // If we have a match, success
       if( response == expected) {
         startState = true;
  // If we have success, start sending data every second
  if(startState) {

Notice that Serial1 uses pins 18 and 19 on the Mega 2560 ( 3rd paragraph). I was not able to get SoftwareSerial working on any of the digital pins on the Mega 2560. I would just try and stick with the hardware serial to connect to your xbee.

On a side note, I spent a lot of time trying to debug code when all that was wrong is I needed to either update the xbee firmware or change some parameters. I would try this:

  1. Adapt my code to your setup
  2. Do a full update of the Wifibee’s firmware, even if you already have the newest one, upload it again
  3. Load the default configuration parameters
  4. If you have accessibility to a oscilloscope, probe your data lines to make sure you are getting the data you expect