Help with my project GPS

Hi guys, excuse my English, I am using a translator.
Well, I have the code in arduino, (blynk defines them and where the pass and router name goes, I have them right, I just did not put it in the following code) that sends the data to blynk.
But on the map only appears my location but not the gps as such, if you mark the coordinates above in some labels that I put, but the location (Location V0, so it is assigned on the map of blynk) does not appear the location of the gps, I think it appears immobile in the coordinate 0,0. The truth is that I got the code from a youtube video using an older blynk…
I am using the ESP8266 module and the gps neo 6m.
Thanks in advance, I hope I understand.

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME "GPS TRACKER"
#define BLYNK_AUTH_TOKEN ""
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

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

TinyGPSPlus gps; // The TinyGPS++ object
WidgetMap myMap(V0);  // V0 for virtual pin of Map Widget

SoftwareSerial ss(RXPin, TXPin);  // The serial connection to the GPS device

BlynkTimer timer;

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

char auth[] = "";              //Your Project authentication key
char ssid[] = "";                                       // Name of your network (HotSpot or Router name)
char pass[] = "";                                      // Corresponding Password

//unsigned int move_index;         // moving index, to be used later
unsigned int move_index = 1;       // fixed location for now
  

void setup()
{
  Serial.begin(9600);
  Serial.println();
  ss.begin(GPSBaud);
  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(V4, "GPS ERROR");  // Value Display widget  on V4 if GPS not detected
  }
}

void loop()
{
    while (ss.available() > 0) 
    {
      // sketch displays information every time a new sentence is correctly encoded.
      if (gps.encode(ss.read()))
        displayInfo();
  }
  Blynk.run();
  timer.run();
}

void displayInfo()
{ 
  if (gps.location.isValid() ) 
  {    
    float latitude = (gps.location.lat());     //Storing the Lat. and Lon. 
    float longitude = (gps.location.lng()); 
    
    Serial.print("LAT:  ");
    Serial.println(latitude, 6);  // float to x decimal places
    Serial.print("LONG: ");
    Serial.println(longitude, 6);
    Blynk.virtualWrite(V1, String(latitude, 6));   
    Blynk.virtualWrite(V2, String(longitude, 6));  
    myMap.location(move_index, latitude, longitude, "GPS_Location");
    spd = gps.speed.kmph();               //get speed
       Blynk.virtualWrite(V3, spd);
       
       sats = gps.satellites.value();    //get number of satellites
       Blynk.virtualWrite(V4, sats);

       bearing = TinyGPSPlus::cardinal(gps.course.value()); // get the direction
       Blynk.virtualWrite(V5, bearing);                   
  }
  
 Serial.println();
}

I don’t really understand your problem.
Can you explain in more detail, maybe with screenshots of your app, and details of the datastreams and widgets you have set-up?

Also, what do you see in your serial monitor?

Pete.

Sure!


The problem I have is in the map, it is not updated with the location of the gps, if the mobile appears, but the gps does not update it. Thanks in advance…

I have this, in the datastreams.


Is it possible that I have something misdeclared? Thank you

Are you going to provide the other information I asked for?

Pete.

On the serial monitor, it shows the blynk logo and the latest version, then it pings blynk.cloud and then prints the latitude and longitude. In the blynk app Latitude, Longitude are labeled value, Latitude is set to V1, Longitude is set to V2. Satellite, speed and Direction are value display. Satellite is set to V4, Speed is set to V3, and Direction is set to V5. And map is set to V0. Do you need any more information?
Thank you…

Copy the text from the serial monitor and paste it, with triple backticks at the beginning and end, the same way you would with code.

Pete.

Well, this appears to me on the serial monitor. But now I have another problem, and it doesn’t print latitude and longitude anymore… It only prints empty jumps… Thank you…
EDIT: I let it connect for a while, and it connected again, now it prints latitude and longitude…

[74] Connecting to Totalplay-2.4G-6430
[7406] Connected to WiFi
[7406] IP: 192.168.100.65
[7406] 
  ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.3.2 on ESP8266

 #StandWithUkraine    https://bit.ly/swua


[7533] Connecting to blynk.cloud:80
[7797] Ready (ping: 94ms).






LAT:  27.488935
LONG: -109.918831

LAT:  27.488935
LONG: -109.918831

Instead of using my map.location

You should probably try using Blynk.virtualWrite(V0, longitude, latitude);

More info here…

Pete.

What type of data can I put in the V0?

I don’t understand the question.

Pete.

When I put the map in the blynk app, EL V0 I can put the data in String, Integer, or Double.

Did you look at the documentation link I provided?

Pete.