I just bought a Mediatek 3329 GPS module. i connected my gps to my arduino uno as in;
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
Serial.println("GPS MTK library test");
GPS.Init(); // GPS Initialization
if (GPS.NewData) // New GPS data?
GPS.NewData = 0; // We have readed the data
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
Wait until the led stop blinking, which means gps is locked. then copy below code
compile, upload and click serial monitor.
Hope this helps.
I tried this code but nothing happens. What does this code do?
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.
I'm pretty sure about my connection, but i ordered a new cable just to be sure whether there is something wrong with the cable or not.
There is nothing appearing in the serial monitor window.
I was confused you say that it has to print everything it reads from gps but i cannot see any print command in the code you sent me? Am i missing something?
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.
thanks for the advice!
i have the same problem... and modifying the following files for the library AP_GPS and the arduino test file:
1) GPT_MTK_test.pde line 16:
AP_GPS_MTK gps(&Serial1); ==> AP_GPS_MTK16 gps(&Serial1);
2) AP_GPS_Auto.cpp line 155:
gps = new AP_GPS_MTK(_port); ==> gps = new AP_GPS_MTK16(_port);
my GPS works fine!!
PD1: ah!! i have the problem testing my GPS on the APM board... i suppose this method workś on Arduino Uno too
PD2: sorry for my english, my mother language is spanish.
HI GUys any of you get the GPS to work with Uno correctly?
thats awesome , you mind sharing your code please . i cant get it working form the post