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

asked May 31, 2019 at 6:50
2
  • The output looks perfectly fine. You just don't have a GPS signal. Commented 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. Commented 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.

answered May 31, 2019 at 17:21
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 Commented Aug 23, 2020 at 14:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.