2

I connected my gps module (NEO-6M) with esp32doit-devkit-v1 board. The module provided data but many data are missing.

My pin configuration:

GPS ------- ESP32
VCC ------- 3v3
GND ------- GND
TX -------- RX2 (pin 16)
RX -------- TX2 (pin 17)

Baud Rate: 9600

My code:

#include <Arduino.h>
#include <TinyGPS++.h>

#define TXD2 17
#define RXD2 16

TinyGPSPlus gps;

void setup()
{
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
  Serial.println("Started......");
}

void loop()
{
  while (Serial2.available())
  {
    Serial.write(Serial2.read());
    // gps.encode(Serial2.read());
    // if (gps.location.isValid())
    // {
    //   Serial.print("Latitude= ");
    //   Serial.print(gps.location.lat(), 6);
    //   Serial.print(" Longitude= ");
    //   Serial.println(gps.location.lng(), 6);
    // }
  }
}

OUTPUT

my output

2
  • The output looks perfectly fine. You just don't have a GPS signal.
    – Majenko
    May 31, 2019 at 8:03
  • @Majenko is right put your GPS outside (in open sky) then you will the latitude and longitude with other parameters as well.
    – Vaibhav
    May 31, 2019 at 16:20

1 Answer 1

0

GPS seems to be working and informing you that you have no signal. Usually happens inside buildings, when far from a window or when antenna isnt properly connected.

Testing out of doors is many times not possible, so try placing your antenna next to a window with a partial view of the sky. Wait for a couple of minutes until you get a fix on 4 or 5 satellites.

1
  • have also found this happens when the power to the module is lower than needed, for example 5v being shared with other modules such as a 1602 display
    – Rob
    Aug 23, 2020 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.