1

The GSM library apparently uses the Software Serial library to perform the communication. The Arduino Micro specified pins for the serial connection to the GSM is pin 2 and 3 (doc says, but see def of RXPIN below?). I would like to shift this to pin 7 and 8 , with 8 as Rx (has interrupt). However: Changing the definition of TXPIN in GSM3IO.h does not appear to give a working sketch. Also: The pin "number" here, does it refer to PDxx number or other (a bit confused by all the pin names ) . .

#elif defined(__AVR_ATmega32U4__)
#define __TXPIN__ 7
#define __RXPIN__ 8  /* Previous 3,8,3 ,... but */
#define __RXINT__ 8
#endif
  • If the pins aren't changing when you change them is it possible that (AVR_ATmega32U4) isn't defined? – Code Gorilla Nov 9 '16 at 12:40
  • How do I check for defines way down in the .h tree? I tried just printing RXPIN in the sketch source (assuming it would be part of the GSM.h includes), but it appears to be undefined. Strange. The GSM library docs suggest this to be the way of changing the pin number.. I do not understand the specification of the interrupt pin not being the same as the receive pin though... (other places I note that somebody suggest this define to be set to a non-valid value....and with apparent success)..Meanwhile i tried using pin 7 and 8 using the SoftwareSerial library with AT commands. It worked. – Per Ove Nov 10 '16 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.