Hi,
I'm testing the MTK3339 GPS with Arduino Leonardo and is not working.
I followed this tutorial: http://learn.adafruit.com/adafruit-ulti ... ter-wiring, I load a 'blank' sketch into the Arduino, but when I open the serial monitor from the Arduino IDE I don't view any data.
Attached is a picture with my wiring
Can you help me with my problem?
Thanks!!
MTK3339 GPS with Arduino Leonardo
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- fran.manez
- Posts: 4
- Joined: Fri Feb 01, 2013 11:53 am
MTK3339 GPS with Arduino Leonardo
- Attachments
-
- wiring.JPG (51.93 KiB) Viewed 3720 times
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
Looks right. Have you set the data rate in the serial monitor to 9600?
Try different jumper wires or different breadboard locations. Sometimes the connections can be a little finicky.
Try different jumper wires or different breadboard locations. Sometimes the connections can be a little finicky.
- dennisma
- Posts: 31
- Joined: Fri Feb 01, 2013 5:39 pm
Re: MTK3339 GPS with Arduino Leonardo
I don't have this particular GPS but doesn't the TX pin on the Arduino go to the RX pin on the GPS (and Arduino's RX go to the GPS's TX).
From the pic it looks like RX is going to RX and TX is going to TX (which is normally wrong).
Or maybe it is just late on Friday and I can't tell...
From the pic it looks like RX is going to RX and TX is going to TX (which is normally wrong).
Or maybe it is just late on Friday and I can't tell...
- fran.manez
- Posts: 4
- Joined: Fri Feb 01, 2013 11:53 am
Re: MTK3339 GPS with Arduino Leonardo
driverblock,
I set the the data rate in the serial monitor to 9600. And I have changed the jumper wires and the breadboard locations... and not working yet.
It's possible that the GPS module is damaged or defective?
I tried to load the other examples in the tutorial and not working.
The GPS fix light flashes every second. Then changes to flash every 15 seconds ... this is correct?
______
dennisma,
the connections are correct. They are the same as in the tutorial:
// Connect VIN to +5V
// Connect GND to Ground
// Connect GPS RX (data into GPS) to Digital 0
// Connect GPS TX (data out from GPS) to Digital 1
I set the the data rate in the serial monitor to 9600. And I have changed the jumper wires and the breadboard locations... and not working yet.
It's possible that the GPS module is damaged or defective?
I tried to load the other examples in the tutorial and not working.
The GPS fix light flashes every second. Then changes to flash every 15 seconds ... this is correct?
______
dennisma,
the connections are correct. They are the same as in the tutorial:
// Connect VIN to +5V
// Connect GND to Ground
// Connect GPS RX (data into GPS) to Digital 0
// Connect GPS TX (data out from GPS) to Digital 1
- dennisma
- Posts: 31
- Joined: Fri Feb 01, 2013 5:39 pm
Re: MTK3339 GPS with Arduino Leonardo
Yes, but that appears incorrect. Digital 0 is RX and it always connects to TX on a GPS. The Transmit (TX) line of the GPS must connect to the Receive (RX) of the Arduino. That is normally how GPS's hook upfran.manez wrote:driverblock,
the connections are correct. They are the same as in the tutorial:
// Connect VIN to +5V
// Connect GND to Ground
// Connect GPS RX (data into GPS) to Digital 0
// Connect GPS TX (data out from GPS) to Digital 1
If you do not believe me (and why should you?), look at Adafruit's wearable GPS wiring instructions at http://learn.adafruit.com/flora-wearabl ... ook-up-gps
It says: "Likewise connect RX to TX and TX to RX..."
See the wiring from same page:
Now look at your board. You have Digital 0 (RX) connected to GPS RX. It won't work.
Also look at this wire hookup from the net. Notice that Digital Pin 0 (RX) is connecting to TX. Also note that Pin 1 is not connected because it doesn't need to be. You never talk to the GPS, you just receive the NMEA sentences from it.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
Dennisma is correct. The picture in the tutorial shows the wrong wiring on Tx and Rx. Swap the green and orange wires on the Leonardo.
Meanwhile, I'll see about fixing the tutorial...
Meanwhile, I'll see about fixing the tutorial...
- dennisma
- Posts: 31
- Joined: Fri Feb 01, 2013 5:39 pm
Re: MTK3339 GPS with Arduino Leonardo
Always good to know I am not going crazy... yet.driverblock wrote:Dennisma is correct. The picture in the tutorial shows the wrong wiring on Tx and Rx.
fran.manez let us know how it works out for you.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
Wait... wait a minute....
We're all wrong!!
@dennisma - the tutorial step the OP is doing calls for Direct Writing to the computer. For this purpose, wiring TX to TX and Rx to RX is actually correct, since the idea is to bypass the ATmega328 and go straight to the USB interface chip.
@fran.manez - you are using a Leonardo, which doesn't have a separate USB interface chip. The Direct Wiring to Computer step cannot be done with a Leonardo, since it relies on a trick of the Uno (and earlier) hardware design.
Just skip this step and go on to the next one.
We're all wrong!!
@dennisma - the tutorial step the OP is doing calls for Direct Writing to the computer. For this purpose, wiring TX to TX and Rx to RX is actually correct, since the idea is to bypass the ATmega328 and go straight to the USB interface chip.
@fran.manez - you are using a Leonardo, which doesn't have a separate USB interface chip. The Direct Wiring to Computer step cannot be done with a Leonardo, since it relies on a trick of the Uno (and earlier) hardware design.
Just skip this step and go on to the next one.
- dennisma
- Posts: 31
- Joined: Fri Feb 01, 2013 5:39 pm
Re: MTK3339 GPS with Arduino Leonardo
Ha! You are correct. I should have looked at what the Tutorial was doing. It was all empty code.driverblock wrote:We're all wrong!!
Dang Leonardo's and their wacky serial. Sorry fran.manez
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
@fran.manez - I just went through the tutorial, and the example sketches on GitHub are not compatible with the Leonardo. The GPS library works - it's just an issue with the way the example sketches are written.
I plan to update the sketches for the Leonardo over the weekend. Thanks for your patience.
Meanwhile, I hacked up a quick and dirty fix to the echo sketch, which you are welcome to try (attached).
All you have to do is swap the connections to TX and RX:
GPS Tx -> Leo RX1
GPS Rx -> Leo TX1
Set the serial monitor for 57600.
I plan to update the sketches for the Leonardo over the weekend. Thanks for your patience.
Meanwhile, I hacked up a quick and dirty fix to the echo sketch, which you are welcome to try (attached).
All you have to do is swap the connections to TX and RX:
GPS Tx -> Leo RX1
GPS Rx -> Leo TX1
Set the serial monitor for 57600.
- fran.manez
- Posts: 4
- Joined: Fri Feb 01, 2013 11:53 am
Re: MTK3339 GPS with Arduino Leonardo
@driverblock - great!! is working now!! thank you very much. Your code working perfectly.
Let me know when you update the sketches for the Leonardo
@dennisma - thanks for your help
Let me know when you update the sketches for the Leonardo
@dennisma - thanks for your help
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
Example sketches for Leonardo have been added to the Adafruit GPS LIbrary
-
- Posts: 1
- Joined: Mon May 06, 2013 6:04 am
Re: MTK3339 GPS with Arduino Leonardo
Maybe I can get some help as well.
I'm also currently using this particular GPS. However, I want to format the text I receive from the command
Serial.print(GPS.latitude, 4); Serial.print(GPS.lat);
The output is in this form = 5533.7563N, 1300.2744E.
I would like it to be in this form = 55 33.7563N, 13 00.2744E.
Any suggestions?
//
Best Regards
I'm also currently using this particular GPS. However, I want to format the text I receive from the command
Serial.print(GPS.latitude, 4); Serial.print(GPS.lat);
The output is in this form = 5533.7563N, 1300.2744E.
I would like it to be in this form = 55 33.7563N, 13 00.2744E.
Any suggestions?
//
Best Regards
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MTK3339 GPS with Arduino Leonardo
Try this:
Code: Select all
Serial.print("Location: ");
int GPSdegrees = (int)(GPS.latitude/100);
Serial.print(GPSdegrees); Serial.print(" "); Serial.print(GPS.latitude-GPSdegrees, 4); Serial.print(GPS.lat);
Serial.print(", ");
GPSdegrees = (int)(GPS.longitude/100);
Serial.print(GPSdegrees); Serial.print(" "); Serial.print(GPS.longitude-GPSdegrees, 4); Serial.println(GPS.lon);
Please be positive and constructive with your questions and comments.