not able to get out put when using both gsm and gps with arduino uno for thingsp

Hi Guys,

Can any one review mu code and suggest me corrections

#include <SoftwareSerial.h>
#include <TinyGPS.h>
#include <String.h>

SoftwareSerial mySerial(7, 8); // Connect TX - 7 & RX - 8

#define GPS_RX_PIN 3
#define GPS_TX_PIN 4
long lat,lon; // create variable for latitude and longitude object

SoftwareSerial gpsSerial(GPS_RX_PIN, GPS_TX_PIN); // create soft serial object
TinyGPS gps; // create gps object

void setup()
{
mySerial.begin(9600); // the GPRS baud rate
Serial.begin(9600); // the GPRS baud rate
gpsSerial.begin(9600); // connect gps sensor
pinMode(GPS_RX_PIN, INPUT);
pinMode(GPS_TX_PIN, OUTPUT);
}

void loop()
{
while(gpsSerial.available()){ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&lat,&lon); // get latitude and longitude
Serial.print("lat: “);
Serial.print(lat);
Serial.print(” ");
Serial.print("lon: ");
Serial.println(lon);
}
}
Send2Pachube();

if (mySerial.available())
Serial.write(mySerial.read());

}
void Send2Pachube()
{
mySerial.println(“AT”);
delay(1000);

mySerial.println(“AT+CPIN?”);
delay(1000);

mySerial.println(“AT+CREG?”);
delay(1000);

mySerial.println(“AT+CGATT?”);
delay(1000);

mySerial.println(“AT+CIPSHUT”);
delay(1000);

mySerial.println(“AT+CIPSTATUS”);
delay(2000);

mySerial.println(“AT+CIPMUX=0”);
delay(2000);

ShowSerialData();

mySerial.println(“AT+CSTT=“internet””);//start task and setting the APN,
delay(1000);

ShowSerialData();

mySerial.println(“AT+CIICR”);//bring up wireless connection
delay(3000);

ShowSerialData();

mySerial.println(“AT+CIFSR”);//get local IP adress
delay(2000);

ShowSerialData();

mySerial.println(“AT+CIPSPRT=0”);
delay(3000);

ShowSerialData();

mySerial.println("AT+CIPSTART=“TCP”,“api.thingspeak.com”,“80"”);//start up the connection
delay(6000);

ShowSerialData();

mySerial.println(“AT+CIPSEND”);//begin send data to remote server
delay(4000);
ShowSerialData();

String str=“GET http://api.thingspeak.com/update?api_key=NK5YNOAQ6IETQJ5U&field1=” + String(lon)+"&field2=" + String(lat);
mySerial.println(str);//begin send data to remote server
delay(4000);
ShowSerialData();

mySerial.println((char)26);//sending
delay(5000);//waitting for reply, important! the time is base on the condition of internet
mySerial.println();

ShowSerialData();

mySerial.println(“AT+CIPSHUT”);//close the connection
delay(1000);
ShowSerialData();
}
void ShowSerialData()
{
while(mySerial.available()!=0)
Serial.write(mySerial.read());
}

Information on using 2 instances of software serial.

How to use this forum.