MTK 3329 GPS w/ arduino uno

hello;

I just bought a Mediatek 3329 GPS module. i connected my gps to my arduino uno as in;

5V----> 5V

GND--->GND

OUT---->RX

And i'm trying to use the below code:

/*
Example of GPS MTK library.
Code by Jordi Mu�oz and Jose Julio. DIYDrones.com

Works with Ardupilot Mega Hardware (GPS on Serial Port1)
and with standard ATMega168 and ATMega328 on Serial Port 0
*/

#include <GPS_MTK.h> // UBLOX GPS Library

void setup()
{
Serial.begin(38400);
Serial.println("GPS MTK library test");
GPS.Init(); // GPS Initialization
delay(1000);
}
void loop()
{
GPS.Read();
if (GPS.NewData) // New GPS data?
{
Serial.print("GPS:");
Serial.print(" Lat:");
Serial.print(GPS.Lattitude);
Serial.print(" Lon:");
Serial.print(GPS.Longitude);
Serial.print(" Alt:");
Serial.print((float)GPS.Altitude/100.0);
Serial.print(" GSP:");
Serial.print((float)GPS.Ground_Speed/100.0);
Serial.print(" COG:");
Serial.print(GPS.Ground_Course/1000000);
Serial.print(" SAT:");
Serial.print((int)GPS.NumSats);
Serial.print(" FIX:");
Serial.print((int)GPS.Fix);
Serial.print(" TIM:");
Serial.print(GPS.Time);
Serial.println();
GPS.NewData = 0; // We have readed the data
}
delay(20);
}

But after GPS is locked onto satellites, i can not get a data from GPS i only have 

"GPS MTK library test"

What should i have to do?

Can anybody help please

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Yes. Gps working quite well.
  • If you "just bought" this unit, you need the library that works with the newer firmware GPS. GPS_MTK.h is at least a year old, and speaks to the old GPS firmware.

    I believe the correct name is AP_GPS_MTK16.h and AP_GPS_MTK16.cpp

    You will have to alter the code to force the library to read from serial0 ("serial") instead of Serial1.

    If the new software has too many dependencies for you, you could scoop out the guts of the new parser and put it into the old.

    *

    Ignore ahmed's code. It does next to nothing, and completely nothing regarding reading / writing any data out the ports. In fact he screws up your serial TX by making it an input.

  • Even gps is locked or not, code writes to window what it reads from the gps. Are you sure with your connection? I advice you to check connector lines from the pcb pads. with a buzzer. I mean one end to bottom of the gps OUT and other end arduino to the bottom of the arduino Rx.

    Since blue led blinking power supply is ok.

  • Hi Batuhan,

    Wait until the led stop blinking, which means gps is locked. then copy below code

     void setup(){
      pinMode(0,INPUT);
      digitalWrite(0,LOW);
      pinMode(1,INPUT);
      digitalWrite(1,LOW);
    }

    void loop(){
      while(1);
    }

    compile, upload and click serial monitor.

    Hope this helps.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…