Arduino Mega 2560 R3 and Wireless Shield v2 not working

Hi all,

I am working on a robot that can be controlled by joystick and voice recognition wirelessly. Everything works as expected until I change the arduino board on the receiving end.

Working:

Receiver - Arduino Uno R3, XBee Series 2 module on Arduino Wireless Shield v2 that is stacked on top of Arduino Uno
Transmitter - Arduino Mega 2560 R3, EasyVR Arduino Shield stacked on Mega 2560, XBee Series 2 module on Arduino Wireless Shield v2 stacked on EasyVR Shield

Not Working:

Receiver - Arduino Mega 2560 R3, XBee Series 2 module on Arduino Wireless Shield v2 that is stacked on top of Mega 2560
Transmitter - Arduino Mega 2560 R3, EasyVR Arduino Shield stacked on Mega 2560, XBee Series 2 module on Arduino Wireless Shield v2 stacked on EasyVR Shield

I have run out of digital pins to use for an LCD display that I am incorporating and hence need to change to Mega 2560.

So far, I have reached at a conclusion that the Mega boards are transmitting properly as I can see that from the LEDs on the Wireless Shield but the problem is that they are not receiving properly. I have tried interchanging the Mega boards but that has not helped. As soon as I put the Arduino Uno back everything works normal.

Any help regarding this issue will be appreciated. Thank you in advance for your time and support.

Links:

Arduino: http://arduino.cc/en/Main/arduinoBoardMega2560
Wireless Shield: http://www.digikey.com/product-detail/en/A000064/1050-1023-ND/2784004
EasyVR Shield: http://www.veear.eu/products/easyvr-arduino-shield/

Which pins are you trying to use to talk to whatever is on the wireless shield? What does your code look like?

PaulS:
Which pins are you trying to use to talk to whatever is on the wireless shield? What does your code look like?

As mentioned earlier, it's an Xbee series 2 module on the Sheild. As it's a Sheild, it uses the digital Pins 0 and 1 (tx and rx) pins on the board to communicate.

As it's a Sheild, it uses the digital Pins 0 and 1 (tx and rx) pins on the board to communicate.

That depends on the position of the switch on the shield, which you haven't defined. Nor have you posted any code.

PaulS:
That depends on the position of the switch on the shield, which you haven't defined. Nor have you posted any code.

The switch is in 'micro' position on both shields. Please find pseudo code below:

#define motorPin1  2
#define motorPin2  3
#define motorPin3  4
#define motorPin4  5

void setup() {
  
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);

  Serial.begin(9600);
}

void loop() {
 
  checkDriveMode();

  IF (driveMode == xx) {    

      IF Serial.available() {
          
          Serial.read().......
          // perform actions as required

      }
  } 
  else if (driveMode == yy) {    

      IF Serial.available() {
          
          Serial.read().......
          // perform actions as required
      }
  }

}