Skip to content

Commit bbd7514

Browse files
committed
Use pin 11 on a Mega for GSM soft serial
By default the GSM library uses digital pin 10 to communicate with the Mega but pin 10 is also used for the Ethernet shield's chip select. So if the shield is connected together with the Ethernet shield, we need to use a different interrupt pin for communication. Not all pins on the Mega and Mega 2560 support change interrupts. 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). We decided to use pin 11 so we need to change the __RXPIN__ definition in the GSM3SoftSerial in the GSM library.
1 parent a5ad983 commit bbd7514

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/GSM/GSM3SoftSerial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This file is part of the GSM3 communications library for Arduino
88
-- TCP/IP connections
99
-- HTTP basic clients
1010
11-
This library has been developed by Telefónica Digital - PDI -
11+
This library has been developed by Telef�nica Digital - PDI -
1212
- Physical Internet Lab, as part as its collaboration with
1313
Arduino and the Open Hardware Community.
1414
@@ -44,7 +44,7 @@ The latest version of this library can always be found at
4444
#define __RXINT__ 3
4545
#elif defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
4646
#define __TXPIN__ 3
47-
#define __RXPIN__ 10
47+
#define __RXPIN__ 11
4848
#define __RXINT__ 4
4949
#elif defined(__AVR_ATmega32U4__)
5050
#define __TXPIN__ 3

0 commit comments

Comments
 (0)