Hello.
I need to increase the update rate of the ultimate GPS breakout from the rPi. I have it working successfully at the default 1Hz just fine but have been unable to successfully change the update rate.
I am currently using it via the usb connection explained in the tutorial. But I could move it to GPIO is need be.
Please help and thank you in advance.
Help with Adafruit Ultimate GPS breakout.
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Help with Adafruit Ultimate GPS breakout.
Here are the update rate sentences we have defined in the arduino library:
So, if you wanted to switch to 5Hz, you would send the command string $PMTK220,200*2C to the GPS.
Code: Select all
// different commands to set the update rate from once a second (1 Hz) to 10 times a second (10Hz)
#define PMTK_SET_NMEA_UPDATE_01HZ "$PMTK220,10000*2F"
#define PMTK_SET_NMEA_UPDATE_1HZ "$PMTK220,1000*1F"
#define PMTK_SET_NMEA_UPDATE_5HZ "$PMTK220,200*2C"
#define PMTK_SET_NMEA_UPDATE_10HZ "$PMTK220,100*2F"
-
- Posts: 8
- Joined: Thu Mar 28, 2013 12:38 pm
Re: Help with Adafruit Ultimate GPS breakout.
Thanks for the info. I tried sending the command via python using the code snippet below:
I didn't receive any errors, but data is still coming in at 1 second intervals.
I'm not dedicated to setting via Python, its just something I'm more familiar with, if there is a better way (shell script, putty, etc.) I'm open to any input.
Again thank you for the help.
Code: Select all
import serial
s = serial.Serial(port='/dev/ttyUSB0', baudrate=9600)
s.write('$PMTK220,200*2C')
I'm not dedicated to setting via Python, its just something I'm more familiar with, if there is a better way (shell script, putty, etc.) I'm open to any input.
Again thank you for the help.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Help with Adafruit Ultimate GPS breakout.
If you post your code, we'll see if we can spot the problem
-
- Posts: 8
- Joined: Thu Mar 28, 2013 12:38 pm
Re: Help with Adafruit Ultimate GPS breakout.
I was able to resolve my problem. It turns out that you can't set the update rate to 5Hz or 10 Hz (I suspect anything > 1Hz) unless you update the baud rate. Before updating the baud rate I was receiving ACK message back saying command "understood but failed" Once I increased the baud rate to 38400 I can set the update rate to 10Hz successfully.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Help with Adafruit Ultimate GPS breakout.
Ah, yes. Glad you figured it out!
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/