GPS Module no output

I was wondering how to make this NEO-6M gps module to work with nodemcu.
Heres my test code and serial.
The gps module is blinking,

Heres the full test code:

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

SoftwareSerial ss(4, 5); // The serial connection to the GPS device
TinyGPSPlus gps;
void setup() {
 
  Serial.begin(115200);
  ss.begin(9600);
}

void loop() {
  while (ss.available() > 0){
    Serial.print("Raw Data: ");
    Serial.println(ss.read());
    
    if (gps.encode(ss.read())) {
        Serial.println("Latitude: " + String(gps.location.lat() , 6));
        Serial.println("Longitude: " +  String(gps.location.lng() , 6));
    }
    delay(1000);
  }
}

VCC of Module -> 3V of nodemcu
GND of Module -> GND of nodemcu
TX of Module ->D2 of nodemcu.

btw im getting random numbers still even after removing the tx of module from nodemcu.

Hello arcturus04

Can the GPS receiver see the satellites or just the ceiling of your room?

i went outside so that the gps module have a clear view of sky and left it there for about an hour.

Does D2 translate to pin 4 (i.e the pin used for rx in SoftwareSerial)?

yes, its GPIO4 of nodemcu.

it suprise me that this code from adafruit works.
https://raw.githubusercontent.com/adafruit/Adafruit-MTK3329-GPS-Module-Test-Sketch/master/Adafruit_MTK3329_GPS_Test.pde

Did you change that Adafruit code to get that output?

The Adafruit code is using SoftwareSerial like this:

  #if (ARDUINO >= 100)
#include <SoftSerial.h>
SoftSerial mySerial(2, 3);
  #else
// If you're using Arduino IDE v23 or earlier, you'll
// need to install NewSoftSerial
#include <NewSoftSerial.h>
NewSoftSerial mySerial(2, 3);
  #endif

i.e. not pins 4 & 5.

yes, the compiler said that the SoftSerial is not included so i changed that to SoftwareSerial

Please post code and text using copy/paste and code tags, not as pictures.

From the output, it is clear the GPS module does not have a satellite fix. Either it does not have an antenna or the antenna connection is poor, or broken, or you are not outside with a clear view of the sky.

In the case of the NEO-6M, be aware that the market is flooded with counterfeits.

thank you for pointing that out, its night time and im currently inside of our house so i think so too.

its working now, thank you for your answers and suggestions!
and it locked itself even inside of our house.

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