I have issue in display latitude, longitude data in blynk app

Tq sir for giv me chance…

Second Question is i have issue in display latitude, longitude data in blynk app…
Here is the code…

#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

const int RXPin = 4, TXPin = 5; //GPIO 4=D2(conneect Tx of GPS) and GPIO 5=D1(Connect Rx of GPS 
const uint32_t GPSBaud = 4600; //if boud rate 9600 didn't work in your case then use 4600

TinyGPSPlus gps; //the TinyGPS++ object
WidgetMap myMap(V0);
SoftwareSerial ss(RXPin,TXPin); // The serial connection to the GPS device
BlynkTimer timer;

float spd;    // variable to store speed
float sats;   // variable to store no. of satellites response
String bearing; // variable to store orientation or direction of GPS

char auth[] = "xxx";
char ssid[] = "xxx";
char pass[] = "xxxx";

//unsigned int move_index;  //moving index, to be used later
unsigned int move_index = 1;

void setup()
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(5000L, checkGPS); // every 5s check if GPS is connected, only really needs to be done once

void checkGPS()
  if (gps.charsProcessed() < 10 )
    Serial.println(F("No GPS detected: check wiring."));
    Blynk.virtualWrite(V5, "GPS ERROR"); // Value display widget on V5 if GPS is not detected

void loop()
  while(ss.available() > 0)
    //sketch display information every time a new sentences is correctly encoded
    if (gps.encode(ss.read()))

void displayInfo()
  if (gps.location.isValid() )
    float latitude = (gps.location.lat()); // Storing the latitude & logitude
    float longitude = (gps.location.lng());

    Serial.print("LATITUDE: ");
    Serial.println(latitude, 6); // float to x decimal places
    Serial.print("LONGITUDE: ");
    Serial.println(longitude, 6);
    Blynk.virtualWrite(V2, String(latitude, 6));
    Blynk.virtualWrite(V3, String(longitude, 6));
    myMap.location(move_index, latitude, longitude, "GPS_location");
    spd = gps.speed.kmph();
      Blynk.virtualWrite(V4,spd); // get nmumber of speed

      sats = gps.satellites.value(); // get number of satellites

      bearing = TinyGPSPlus::cardinal(gps.course.value()); // get the direction
      Blynk.virtualWrite(V6, bearing); 

It just display like this in my Blynk App… Really beg for u guys help…

This should be in a fast timed function, not in the void loop()… and preferably not using the while() as that can be blocking if not information is being transmitted.

I suggest you start with a non-Blynk sketch and Serial Monitor prints to confirm that your GPS is in fact connecting to and supplying the device with proper data… then merge it into the Blynk sketch.

Meanwhile… Please search this forum for other external GPS / Map topics that have been solved or otherwise seem to have sketches, and try them out…


But please don’t just post questions in their topics asking for code. The key is to read, try and learn, not have something handed to you that you still wouldn’t understand.