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

Help with Adafruit Ultimate GPS breakout.

Post by mattcy »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Help with Adafruit Ultimate GPS breakout.

Post by adafruit_support_rick »

Here are the update rate sentences we have defined in the arduino library:

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"
So, if you wanted to switch to 5Hz, you would send the command string $PMTK220,200*2C to the GPS.

mattcy
 
Posts: 8
Joined: Thu Mar 28, 2013 12:38 pm

Re: Help with Adafruit Ultimate GPS breakout.

Post by mattcy »

Thanks for the info. I tried sending the command via python using the code snippet below:

Code: Select all

 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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Help with Adafruit Ultimate GPS breakout.

Post by adafruit_support_rick »

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

mattcy
 
Posts: 8
Joined: Thu Mar 28, 2013 12:38 pm

Re: Help with Adafruit Ultimate GPS breakout.

Post by mattcy »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Help with Adafruit Ultimate GPS breakout.

Post by adafruit_support_rick »

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

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”