Sending the gps data to blynk 2.0

hii,
i am curently working on a project with blynk 2.0.i want to send the received gps data to blynk,but the datastream only showing the first two numbers of gps.i have set it to stream,double,integer but same result.how can i solve this i want to see the incoming lat and long in blynk tiles.also i used a map widget and its sample code but map is always show no data for this time range in cloud.
for testing i have declared a fake location,thanks in advance
the code is

#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
   This sample sketch demonstrates the normal use of a TinyGPSPlus (TinyGPSPlus) object.
   It requires the use of SoftwareSerial, and assumes that you have a
   4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 32, TXPin = 33;
static const uint32_t GPSBaud = 9600;
#define BLYNK_TEMPLATE_ID           "deleted"
#define BLYNK_DEVICE_NAME           "deleted"
#define BLYNK_AUTH_TOKEN            "deleted"
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxxxxxxxxxx";
char pass[] = "Union@1429";

BlynkTimer timer;
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, millis() / 1000);
}
void setup()
{
  Serial.begin(115200);
  ss.begin(GPSBaud);
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(1000L, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run();
  displayInfo();// This sketch displays information every time a new sentence is correctly encoded.
 
}

void displayInfo()
{
   while (ss.available() > 0)
    if (gps.encode(ss.read()))
      

  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
  delay(1000);
  Serial.print(F("Location: ")); 
  if (gps.location.isValid())
  {
    Serial.print(gps.location.lat(), 6);
    Serial.print(F(","));
    Serial.print(gps.location.lng(), 6);
  }
  else
  {
    Serial.print(F("INVALID"));
    Blynk.virtualWrite(V1,"INVALID");
    float lat = 26.225652;
    float lon = 50.589551;

     Blynk.virtualWrite(V4,lat);// **this is where the problem is** 
    //Blynk.virtualWrite(V5,lon);
    
  }

  Serial.print(F("  Date/Time: "));
  if (gps.date.isValid())
  {
    Serial.print(gps.date.month());
    Serial.print(F("/"));
    Serial.print(gps.date.day());
    Serial.print(F("/"));
    Serial.print(gps.date.year());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F(" "));
  if (gps.time.isValid())
  {
    if (gps.time.hour() < 10) Serial.print(F("0"));
    Serial.print(gps.time.hour());
    Serial.print(F(":"));
    if (gps.time.minute() < 10) Serial.print(F("0"));
    Serial.print(gps.time.minute());
    Serial.print(F(":"));
    if (gps.time.second() < 10) Serial.print(F("0"));
    Serial.print(gps.time.second());
    Serial.print(F("."));
    if (gps.time.centisecond() < 10) Serial.print(F("0"));
    Serial.print(gps.time.centisecond());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.println();
}

@Jishnu_Raj Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

1 Like

Screenshots of your datastream setup would be helpful.

Pete.

all widgts virtual pins as strings and for maps i selected location

I meant the detail screen specific to whichever datastream it is that you’re having problems with.

Pete.

hii,

this is my datastream for the map.

Now I’m totally confused about what you’re trying to achieve.

You’re screenshot is of a location datastream on Pin V6.

This requires Longitude & Latitude coordinates to be sent in a Blynk.virtualWrite command.

However, you aren’t sending any data to V6 but you are sending Latitude data to pin V4…

Pete.

hii,
as i mentioned earlier in the question i’m having problem with map, i was using myMap.location(index , lat, lon, “value”); this line is not working anymore instead i found Blynk.virtualWrite(V6,lat, lon); works fine.
map is working now, i wanted to send latitude to a blynk widget label i used v4 pin,but its showing 2 digits(50) instead of 50.585951

So why didn’t you post a screenshot of your V4 datastream then?

Pete.

this is my v4

And what happens if you change it to Double data type?

Pete.