GPS for Grove Pi?

Hi, is the Grove GPS module supported with the GrovePi? I don’t see it in the supported sensor list, but has anyone tried it?

Thanks.

Hey,
The GPS is indeed supported by the GrovePi. We have to update the supported sensors page and add an example. Here is a link to the Python code that reads from the GPS from another of our projects: https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/Examples/GPS%20Bot/gps.py .

-Karan

There are 2 versions of the Grove GPS module with different GPS receiver chips.
The older one uses U-blox 6 and the new one SIM28, which is slightly faster.

Both output a stream of serial NMEA data which you will need to interpret.
http://www.gpsinformation.org/dale/nmea.htm

Connect the GPS to the RPISER port (pass through) and you’ll be able to read it on the Raspberry Pi from /dev/ttyAMA0. You’ll need to disable kernel logging otherwise your /dev/ttyAMA0 will be full of useless noise.

If you connect the GPS to the SERIAL port, the GrovePi’s ATmega328 will be able to speak to it over D0/D1 aka TX/RX, just like any Arduino. The current GrovePi firmware opens a serial connection for debugging purposes, so you’ll need to create you own custom firmware to switch that off, interpret the serial module and expose methods for returning the data.

I have a different GPS module which sits on my Raspberry Pi GPIO and I’ve written some instructions on how to use it. There is a lot of similarities on how to use it.

Thanks - modifying firmware is way above my knowledge here. I’d like a PnP module to just plug in and example code, just like what’s in the GrovePi+ starter kit manual. I thought ease of use was the whole point of the Grove system.

How can I get GPS in an easier to use way? I just want to log environmental sensor info and GPS coordinates at recurring times in the easiest way possible without breadboards, firmware mods, etc.

Thanks!

mcauser - Can the riser board in your github link stack on top of the GrovePi and work in unison with everything else?

You should be able to use either the GPS that Mike mentioned or the Grove GPS directly with the Raspberry Pi and the GrovePi.

If you just want ease of use, then you should connect the Grove GPS to the RASPISER port and parse the data in a simple python program.

-Karan

Karan, thanks.

Is the code in the example you posted above for a scenario where it is connected to the RPISER port? Mike mentioned having to disable kernel logging does that have to be done in this situation - is there a link on how to do that?

Thanks,
Rob

Disable kernel logging like so:

By default the kernel logs messages to /dev/ttyAMA0, which is the same serial port the GPS would connect to.

Tell the kernel to be quiet so the GPS can speak.

Connecting the Grove GPS module to the GrovePi RPISER socket should output the same as using the ITead GPS shield. Both just dump GPS commands down the serial line.

Can you stack the ITead GPS on top of the GrovePi? Not sure, I have never tried. Can’t see why not. The GrovePi speaks to the Raspberry Pi over SPI and I2C. The serial port is pass through. So if you connect a Grove module to the RPISER socket, and you have the ITead GPS shield stacked, they will both talk on the same line and probably interrupt and overwrite each other and give you nonsense data.

I don’t have a Grove GPS module, but I do have another one. Model number: GY-GPS6MV2. It also has a u-blox NEO-6M GPS chip. It has TX,RX,VCC,GND pins which can connect directly to the Raspberry Pi, or to an Arduino. If you connect to an Arduino, which is connected to the Pi, you’ll need to use SoftwareSerial as there is only 1x hardware serial port and if you were forwarding the serial packets from the GPS to the Arduino and then to the Pi, you might as well cut the Arduino out of the loop and connect the GPS directly to the Pi. Unless you have a Mega, which as multiple hardware serial lines, but let’s not worry about that.

You can get different types of Grove cables - some which can connect Grove modules directly to the Raspi GPIO without using a breadboard.

If one day I end up buying a Grove GPS, I’ll add some methods to the firmware.