GPS Example Questions

In GPS example there is the following instructions:

Take a Grove connector and take out the yellow and white cables and cross them over, so that the connector is now “BRYW” from the original “BRWH” configuration.

I’m not sure what “cross them over” means or what exactly I need to do. Also, the picture doesn’t seem to portray what the text is saying.

The GPS grove connector has pins lined up so that the sequence you get is GND,+5V, RX and TX. The RX and TX are the lines which are used to send the data to the Raspberry Pi. To send an recieve the data from the GPS, the RX from the sensor should be connected to the TX on GoPiGo and the TX on the sensor to the RX of the GoPiGo. But by default, TX on the GoPiGo is connected to the TX on the Grove Pi and RX to RX. So you will have to swap the yellow and white lines to make the sensor work with the GoPiGo.


Yes, but how do I do that? Do I have to cut the wires swap and then put then in another connector? Or can I pull them out of the existing connector somehow?

Use a little screwdriver, come from the side and you can pull the cables out, correct the connectors so that the the ‘lock’ will work again and put them into the changed position into the connector.

I got the cable switched, but when I run the example all its says is ‘unable to read’. Does the crossed end need to be connected to one side or the other? I tried both and got the same result. Any suggestions?

The gps.y in Examples/GPS Bot always says unable to read, but the gps.y in Python/other_scripts will display GPS data interspersed with unable to read.

I got the code in other_scripts to work and wrote out some data, but the data is not very accurate. Its says its way east of here in the mountains. About 44.1 miles driving according to Google maps.

its seem you are on the right way. Good.
I have the same problem that GPS is not working. But I managed with GrovePI.
Re accuracy, there was a correction necessary. Correction: Decimal * 60/100.
If you need more, later I can look for the code.
The GoPiGo code uses the SERIAL connection while the GrovePi uses the RPISER connector instead. But the python code is the same (refers to the same connector). See my entry, made a few days ago.
Regards, Klaus

Sorry, I did no manage to extract the text. Possibly I need to play with the settings of VNC Light on OSX.

On the screenshot (attached) on the left there is the working GrovePi+ code. The correct calculation is marked near the bottom.

On the right the (not working) GoPiGo code.

To get it working I suppose the entry /dev/tty/AMAO … has to be changed. This entry is the same for GrovePi+ and GoPiGo whilst it is the RPISER connector (with an original cable) and the SERIAL (with the changed cable) are connected different.

No, I don’t think there is a conversion needed. I typed my address into this site: and it put out the decimal latitude and longitude which were different that what the GPS module put out. A difference of 0.243498 latitude and 0.345898 longitude.

Is it possible we need to wait longer for the module to get a better fix on our position? Although, I let it run for quite a while and lat/long never changed.

Can you publish the working code as written on 23rd March so that others can try ? Its not urgent as I am away for a few days.

Can someone from Dexter address the GPS accuracy issues I talked about above?

Here’s my that I use in the GPS bot example.

You should try out the examples for Raspberry PI and Arduin here: and also try out the software to see if the problem is because of the module itself or because of something in the code.

We have seen problems with the modules itself before. If the problem is in the module then you should ask for a replacement from Seeed or the distributor from where you brought the GPS.


I’m on Mac OS X so that demo program won’t work for me. Is there something for OS X that would work.

Also their Raspberry Pi demo is basically what your example code does. How is it any different? Is it really worth trying?

Hey rschmidt, sorry to hop in here; I was just looking over the . Before we send you off to test the GPS unit, are you sure you’re not entering in GPS data directly into Google maps to get the 40 mile error?

GPS puts out an NMEA string, and the data comes out in the format DDMM.MM where D is degrees, and M is minutes.

If you’re checking this position on Google Maps, you need a straight decimal degrees position (DD). More info on this is here (

There’s an extensive post on converting here:

But before we dig deeper on the problem, I just wanted to check that we’re not pumping GPRMC string data directly into google maps. Is that the case? Can you share your GPRMC string with us (I understand not wanting to because of privacy issues).

I put the the straight decimal numbers into this site:, dividing by 100 first so it should be in DD.MMMMSS format. I pretty sure I’m doing this right. Do you still see a problem?

I think I still see a problem. The site you link to uses Google maps, which is going to run off Decimal Degrees.

So if you want to look up your position, you’ll need to convert DDMM.MM you get from the Seeed sensor to Decimal Degrees.

Without playing around with real numbers to double check my math (I’m not an expert in this mind you), I believe you convert DDMM.MM by the following:

Your number off the seeed sensor should look like XYZA.BC

d = ZA.BC / 60.

Your Decimal degree number, which should work in Google Maps, should be XY+d

I double checked this formula and it seems to work, using this javascript calculator:

You can use the third calculator (where you input DDD MM.MMMM) to calculate the DD number from the string that the sensor reports, and that should report the correct number for Google maps.

Ok, that looks right. What format is the seed sensor outputting? Seems like your project examples should talk about this.

Ok, now everything is working right. I changed the GPS example to output decimal degrees, suitable for putting into Google Maps. Attached is the code.