Hello
I am working on a project that uses a Arduino Uno,GSM Module and an NEFL01 .The gsm library that i am using uses software serial at pin 10 and 11 . The same pins that are used for SPI communication with the NRFl01 . I am planning to change the library to of the gsm and change the software serial pins to other digital pins . I need advice are there any specific pins i should use for the software serial???? Can i use both SPI and software Serial at the same time ? And the general viability of my project
KerstmisNoel:
The gsm library that i am using uses software serial at pin 10 and 11 .
That seems seriously stupid, and you need to check that it is true, You might then have a look at the GSM shield. Mine has software serial on pins D7,D8, which is a reasonable pair to choose, and I thought they were all the same.
Your code, or the library can be edited if and as needs be. Notepad++ is good for editing a library.
Software serial can be used on several pins, check the data sheet. GSM shields typically have jumpers in a six-pin block. You could remove the jumpers entirely, and have flying leads going to any vacant pins available and appropriate. You might also question if you need to use software serial at all.
SoftwareSerial is very inefficient, because it disables interrupts for long periods of time. This can interfere with other parts of your sketch or other libraries, or prevent reading from Serial.
AltSoftSerial is very efficient and can transmit and receive at the same time, unlike SoftwareSerial.
If you really can't switch to those pins (are you sure?), you should try my NeoSWSerial. It's almost as good as AltSoftSerial, and still much better than SoftwareSerial. It can also transmit and receive at the same time.
Both libraries are available from the IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries. Using them may require changing the serial port type used inside the GSM library.