arduino pro mini – GPS: Not receiving any valid output from ATGM336H

0
118

I have an Arduino Pro Mini along with a GPS Unit – ATGM336H. Below is the sketch I’m currently using:

#include <SoftwareSerial.h>
#include "Ublox.h"
SoftwareSerial GPS(4,5);
Ublox serial_gps;

void setup(){
  Serial.begin(9600);
  GPS.begin(9600);
}

void loop(){
  while(GPS.available()){
  char c = GPS.read();
  if(serial_gps.encode(c)){
  Serial.println(serial_gps.longitude); 
    }
  }
}

I’m able to receive NMEA stream from the GPS Unit and parse (tried TinyGPS++, TinyGPS and Ublox) the stream but the data is not valid nor does it ever change. I’ve read that this GPS unit can take up to 32 seconds to get a fixed position and deliver valid co-ords but I cannot receive any.

Serial Monitor

Is there anything obviously wrong with my sketch or hardware setup?

Any and all help would be greatly appreciated!

LEAVE A REPLY

Please enter your comment!
Please enter your name here