GSM Sheild with Arduino Mega 2560

Hello everyone,

I am doing a project using an Arduino mega 2560, I have interfaced two Xbee's one as a coordinator and one as a end point sending readings (high or low) using a magnetic reed switch. I have brought myself a Gsm shield, and I saw on the Arduino website that they're not compatible "out of the box" with a mega so I followed the instructions and jumped pin 2 to 10 and not connected pin 2 of the shield. This worked perfectly using the SMS example on IDE, one problem is i am also using a liquidcrystal display and one of the connections are in pin 2 how am I suppose to solve this? Another thing is when I connect the Tx wire from the Xbee to the Rx pin on the Arduino this sends signals through the serial monitor however I haven't included this into my coding.. so that I am guessing is the problem.

I did try to use the Serial1.print command and changed the pin from Rx0 to Rx1 however this did not display anything on the serial monitor. is that the correct way to change the pin?

Thank you in advance :grin:

one problem is i am also using a liquidcrystal display and one of the connections are in pin 2 how am I suppose to solve this?

The LiquidCrystal library is NOT tied to any specific pins. You tell it which pins to use for each function, based on what pins you actually connect it to. You don't have a problem.

Another thing is when I connect the Tx wire from the Xbee to the Rx pin on the Arduino this sends signals through the serial monitor however I haven't included this into my coding.. so that I am guessing is the problem.

No. Anything that appears on the RX pin goes to the Serial Monitor application, whether put there by the Arduino or by some other device.

Do not connect the XBee to pins 0 and 1.

I did try to use the Serial1.print command and changed the pin from Rx0 to Rx1 however this did not display anything on the serial monitor. is that the correct way to change the pin?

No. The Serial instance is tied to pins 0 and 1 and is the only instance that can send to the Serial Monitor application.

You need to connect the XBee to the RX1 and TX1 pins and use Serial1 to read from/write to it.