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()
  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);

void loop()
  while (Serial2.available())
    // 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);
    // }


my output

  • The output looks perfectly fine. You just don't have a GPS signal. – Majenko May 31 '19 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 '19 at 16:20

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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