GSM and GPS module don't work together I am trying to create a project which involves getting latitude and longitude via GPS Module and send it via GSM Module. My problem here is that individual code is working perfectly. However, if am to initialize both together, none will work.

#include "GSM.h"//wrapper class for Sim800l library
#include "GPS.h"//wrapper class for TinyGPS library
GSM *gsm;
GPS *gps;
void setup()
{
    Serial.begin(9600); // Debugging only
    gsm = new GSM();//initializes SIM800l 
    //gps = new GPS(11,10 );//initializes NEO6MV2//uncommmenting this line won't make both modules work
}
String telNum;
int i = 1;
void loop()
{
    /*
    Serial.println(gps-&gt;getLongitude(),6);
    Serial.println(gps-&gt;getLatitude(),6);
    */

    Serial.println(gsm-&gt;read(i,telNum));
    Serial.println(telNum);
     ++i;
}
You can't use two softwareserial devices together (or not reliably, and not without knowing exactly what you are doing).

It's not even easy using one software and one hardware serial together unless you know what you are doing.

SoftwareSerial blocks everything else from happening while it's sending or receiving, so using it for things that send unsolicited messages (as GPSs do all the time) causes havoc.

The best you can hope for is to use HardwareSerial for the GPS and SoftwareSerial for the GSM, which is call-and-response most of the time.

Better would be to use a better board that has multiple hardware serial ports.