Arduino Mega + SD/Ethernet shield + GSM Shield issue

I have two shields that don't want to get along.

The GSM Shield uses Pins 2, 3, and 7. However, on the Mega I have to jump Pin 2 over to Pin 10 for it to work.

"The GSM library uses digital pin 10 to communicate with the Mega. On the GSM shield, connect a jumper wire between digital pins 2 and 10."

The SD/Ethernet shield uses Pins 4, 10, 11, 12, and 13. However, on the Mega I have to jump 11,12,and 13 to 50,51, and 52. 53 is also added and left open.

"pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general I/O."

My problem is this: Both shields use Pin 10. Both do not seem to be changeable according to these guides. Any suggestions?

Open one of the libraries and modify it to use different pins, and then modify the hardware appropriately in turn - that'd mean jumping pin 2 to a different pin (if modifying the GSM shield) or jumping pin 10 to some other pin (if modifying the other shield), and changing the pin definitions in the library to refer to the new pin.

DrAzzy:
Open one of the libraries and modify it to use different pins, and then modify the hardware appropriately in turn - that'd mean jumping pin 2 to a different pin (if modifying the GSM shield) or jumping pin 10 to some other pin (if modifying the other shield), and changing the pin definitions in the library to refer to the new pin.

Okay, good idea. I'll try changing the pin on the GSM.

In the GSM3SoftSerial.cpp I can see the references for the Uno, Mega, and Leonardo...

#if defined(AVR_ATmega328P)
#define TXPIN 3
#define RXPIN 2
#define RXINT 3
#elif defined(AVR_ATmega2560) || defined(AVR_ATmega1280)
#define TXPIN 3
#define RXPIN 10
#define RXINT 4
#elif defined(AVR_ATmega32U4)
#define TXPIN 3
#define RXPIN 8
#define RXINT 3
#endif

I will try using a different RXPIN.

http://arduino.cc/en/Reference/SoftwareSerial

"Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69)."

I will try pin 15 tonight and see how it goes.

It works now.

Pins 14 and 15 do NOT work, though. Pins 62-69 do.

Thank you, that was very helpful indeed. I now have the GSM module using A15 on the Arduino Mega and not conflicting with the Adafruit SD/RTC module that is also plugged in.

Cheer, Ian.