Blynk map configuration

Can someone help me please. I can't see the location in map widget . I don't what is the problem in this code.

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define BLYNK_TEMPLATE_ID "TMPL6EXI40bET"
#define BLYNK_TEMPLATE_NAME "BUS TRACKING"
#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG
*strong text*

// Define the GPS Serial pins
#define RX_PIN 16
#define TX_PIN 17
#define GPS_BAUD 9600

// Define TinyGPS++ object
TinyGPSPlus gps;

// Define SoftwareSerial object
SoftwareSerial gpsSerial(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(115200);
  gpsSerial.begin(GPS_BAUD);
  BlynkEdgent.begin();
}

void loop() {
  while (gpsSerial.available() > 0) {
    if (gps.encode(gpsSerial.read())) {
      // If a new GPS data is parsed
      float lat = gps.location.lat();
      float lng = gps.location.lng();

      // Print latitude and longitude to Serial Monitor
      Serial.print("Latitude: ");
      Serial.println(lat, 7);
      Serial.print("Longitude: ");
      Serial.println(lng, 7);

      // Send the GPS data to Blynk app
      Blynk.virtualWrite(V1, lat); // Assuming V1 is the virtual pin for latitude
      Blynk.virtualWrite(V2, lng); // Assuming V2 is the virtual pin for longitude
    }
  }
  BlynkEdgent.run();
}

which Arduino?

do you see the lat.long in the Serial monitor ?

I'm using esp32 sir

There's nothing on serial monitor, the code in running
but there's no output

Don’t use SoftwareSerial on your ESP32, you have 3 UART to play with. Use Serial1 or Serial2 for your GPS.

Make sure the terminal is set at 115200 bauds

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.