2

I am using Arduino UNO and SIM 900A. Pins 0 and 1 are used as TX and RX. Is it possible to use any other pins?

Ariser
5771 gold badge8 silver badges26 bronze badges
asked Jul 12, 2016 at 9:01
1
  • 2
    SoftwareSerial... Google GSM shield and Arduino, how then did you have the SIM module working in your other question? Commented Jul 12, 2016 at 9:11

1 Answer 1

6

The best choice for serial communications is obviously the HardwareSerial object, Serial, on pins 0 & 1. However, it is really dedicated to the USB connection (via the onboard Serial-to-USB adapter). There are ways to connect other devices to these pins, but it is an advanced topic, and should not be attempted by beginners.

The second best choice would be pins 8 & 9, because AltSoftSerial requires those pins. It is very efficient and reliable.

After that, any other pins can be used with one of these two software serial libraries:

NeoSWSerial is less efficient than AltSoftSerial, but much more efficient than SoftwareSerial. It only supports baud rates 9600, 19200 and 38400, but it does support simultaneous TX and RX. I maintain this library.

If you must use a different baud rate, SoftwareSerial is the last choice. It blocks interrupts for long periods of time and can interfere with other libraries. It cannot transmit and receive at the same time.

answered Jul 13, 2016 at 1:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.