Hey,
I’m following the tutorial here (http://www.dexterindustries.com/GoPiGo/projects/python-examples-for-the-raspberry-pi/example-project-a-raspberry-pi-gps-guided-robot-with-the-gopigo/ ).
I have the Grove GPS installed. However, after running the python script, i’m unable to capture data.
Do I have to cross the wires like they mentioned in the tutorial?
karan
February 24, 2016, 11:28pm
2
Hi fawazalm,
Yeah, you would have to cross the wires to make it work.
-Karan
Hello Karan,
Even though I crossed the wires, I still couldn’t capture data.
Any ideas of what the problem may be?
JohnC
February 25, 2016, 1:30am
4
If we backup, what version of the GoPiGo are you using?
I’m using the latest versions of the GoPiGo and the Grove GPS module.
JohnC
February 25, 2016, 1:58am
6
This should not require a switching of the lines. On the GPG2 the lines are not reversed for serial I think. Just to confirm, your GPG came with a velcro strap for the battery pack, right?
Yes. Even when I don’t switch the lines it still wouldn’t work. Could the problem be software related?
JohnC
February 25, 2016, 2:11am
8
Do you have a logic analyzer avalable to check the lines? What I would like to do is check the serial data back and forth on the serial line and make sure that the GPS module is working.
No, unfortunately I don’t have one. Is there any other way to check if the GPS module is working?
JohnC
February 25, 2016, 3:53am
10
Let me give it a shot, I am working on a project with these parts at the moment.
JohnC
February 25, 2016, 5:07am
11
Can you try this code to test if your GPS sensor is working:
#!/usr/bin/env python
########################################################################
# This example is for is the simplest GPS Script. It simply reads the
# raw output of the GPS sensor on the GoPiGo or GrovePi and prints it.
#
# http://www.dexterindustries.com/GoPiGo/
# http://www.dexterindustries.com/GrovePi/
# History
# ------------------------------------------------
# Author Date Comments
# John 2/25/2015 Initial Authoring
#
# These files have been made available online through a Creative Commons Attribution-ShareAlike 3.0 license.
# (http://creativecommons.org/licenses/by-sa/3.0/)
#
########################################################################
from gopigo import *
import serial, time
This file has been truncated. show original
What’s the output? Do you get a full GPRMC string out?
Hello John,
Yes, I got the a similar output.
$GPGGA,000047.799,0,0,M,M,*4C
$GPGSA,A,1,*1E
$GPGSV,1,1,00*79
$GPRMC,000047.799,V,0.00,0.00,060180,N*46
$GPGGA,000048.799,0,0,M,M,*43
$GPGSA,A,1,*1E
$GPGSV,1,1,00*79
$GPRMC,000048.799,V,0.00,0.00,060180,N*49
$GPGGA,000049.799,0,0,M,M,*42
$GPGSA,A,1,*1E
$GPGSV,1,1,00*79
JohnC
February 26, 2016, 3:36am
13
Great, that means your sensor is working. That’s great news! You may need to add a 0.001 or 0.01 delay before the serial read of the GPS to make the other program work though.
YES, IT WORKED!
Thank you so much for your help!
JohnC
February 28, 2016, 6:07am
15
Good deal. Did you make any changes to the files? Would you mind making a pull request if you did?