Wrong in uploading on Thingspeak (Getting 0.000000 value instead of coordinates)

Hello to everyone. I am beginner in Arduino and I am trying to upload the coordinates (Latitude & Longitude) on Thingspeak but the data that are uploaded is 0.000000 in field1 and field2. (Attached picture)
The list with the components:

  • Arduino Uno
  • GSM Module (SIM900)
  • GPS Module (NEO6M)

I did succesfully another project which sends the coordinates with SMS, so the modules are not faulty.

I have read a lot of articles, watched videos and follow step-by-step tutorials making a lot of changes but without any result. I hope you can help me!

The code:

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


TinyGPSPlus GPS;
float Latitude ;
float Longitude ;
String Data;

SoftwareSerial Thingspeak(10, 11); // It is the GSM Module
SoftwareSerial GPS_Module(13, 12); 


void setup()
{
Thingspeak.begin(9600);
Serial.begin(9600);
GPS_Module.begin(9600);
}

void loop()
{        
  delay(200);          
    Thingspeak_Upload();
    
  
 if (Thingspeak.available())
   Serial.write(Thingspeak.read());
}

void Thingspeak_Upload()
{
 Thingspeak.println("AT");
 delay(1000);
 Thingspeak.println("AT+CPIN?"); 
 delay(1000);
 Thingspeak.print("AT+CREG?");
 delay(1000);
 Thingspeak.print("AT+CGATT?");
 delay(1000);
 Thingspeak.println("AT+CIPSHUT");
 delay(1000);
 Thingspeak.println("AT+CIPSTATUS");
 delay(2000);
 Thingspeak.println("AT+CIPMUX=0");
 delay(2000);
 ShowSerialData();
 Thingspeak.println("AT+CSTT=\"internet.vodafone.gr\"");
 delay(1000);
 ShowSerialData();
 Thingspeak.println("AT+CIICR");
 delay(3000);
 ShowSerialData();
 Thingspeak.println("AT+CIFSR");
 delay(2000);
 ShowSerialData();
 Thingspeak.println("AT+CIPSPRT=0");
 delay(3000);
 ShowSerialData();
 Thingspeak.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");
 delay(6000);
 ShowSerialData();
 Thingspeak.println("AT+CIPSEND");//begin send data to remote server
 delay(4000);
 ShowSerialData();


   String Latitude = String(GPS.location.lat(),6);
   String Longitude = String(GPS.location.lng(),6);
   
   Data = "GET http://api.thingspeak.com/update?api_key=MyAPIKEY&field1="+Latitude +"&field2="+Longitude; 

   
 Thingspeak.println(Data);
 delay(4000);
 ShowSerialData();

 Thingspeak.println((char)26); 
 delay(5000);
 Thingspeak.println();
 ShowSerialData();

 Thingspeak.println("AT+CIPSHUT");
 delay(100);
 ShowSerialData();
} 

void ShowSerialData()
{
 while(Thingspeak.available()!=0)
   Serial.write(Thingspeak.read());
   delay(0);
}

Screenshot_4.jpg

You have posted code without using code tags. The code tags make the code look

like this

when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don’t do it, some of the character sequences in the code can be misinterpred by the forum code as italics or funny emoticons. The “Code: [Select]” feature allows someone to select the entire sketch so it can be easily copied and pasted into the IDE for testing.
If you have already posted without using code tags, open your message and select “modify” from the pull down menu labelled, “More”, at the lower left corner of the message. Highlight your code by selecting it (it turns blue), and then click on the “</>” icon at the upper left hand corner. Click on the “Save” button. Code tags can also be inserted manually in the forum text using the code and /code metatags.