Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

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/

Help with Adafruit Ultimate GPS breakout.

by mattcy on Thu May 09, 2013 5:46 pm

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.
mattcy
 
Posts: 8
Joined: Thu Mar 28, 2013 12:38 pm

Re: Help with Adafruit Ultimate GPS breakout.

by adafruit_support_rick on Thu May 09, 2013 6:20 pm

Here are the update rate sentences we have defined in the arduino library:
Code: Select all | TOGGLE FULL SIZE
// 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"

So, if you wanted to switch to 5Hz, you would send the command string $PMTK220,200*2C to the GPS.

adafruit_support_rick
 
Posts: 18410
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Help with Adafruit Ultimate GPS breakout.

by mattcy on Thu May 09, 2013 9:47 pm

Thanks for the info. I tried sending the command via python using the code snippet below:
Code: Select all | TOGGLE FULL SIZE
 import serial
s = serial.Serial(port='/dev/ttyUSB0', baudrate=9600)
s.write('$PMTK220,200*2C')


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.
mattcy
 
Posts: 8
Joined: Thu Mar 28, 2013 12:38 pm

Re: Help with Adafruit Ultimate GPS breakout.

by adafruit_support_rick on Fri May 10, 2013 11:28 am

If you post your code, we'll see if we can spot the problem

adafruit_support_rick
 
Posts: 18410
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Help with Adafruit Ultimate GPS breakout.

by mattcy on Sat May 11, 2013 5:57 pm

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.
mattcy
 
Posts: 8
Joined: Thu Mar 28, 2013 12:38 pm

Re: Help with Adafruit Ultimate GPS breakout.

by adafruit_support_rick on Sat May 11, 2013 6:04 pm

Ah, yes. Glad you figured it out! :D

adafruit_support_rick
 
Posts: 18410
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY