Neo-6M GPS shield - update faster than 1Hz

How can I configure the Neo-6m to do this?

If you don't care about getting a confirmation ACK for the configuration command, you can just send the bytes:

const unsigned char UBLOX_INIT[] PROGMEM = {
  // Rate (pick one)
//  0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12, //(10Hz)
  //0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A, //(5Hz)
  0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39 //(1Hz)
};

void setup()
{
    ...

  gpsPort.begin( GPS_BAUDRATE );
  // send configuration data in UBX protocol
  for(unsigned int i = 0; i < sizeof(UBLOX_INIT); i++) {                        
    gpsPort.write( pgm_read_byte(UBLOX_INIT+i) );
  }
}

At the higher update rates, you must configure the baud rate to be higher than 9600 and/or disable sentences that you don't use. Here are the binary commands to disable various NMEA sentences:

  // Disable NMEA
//  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x24, // GxGGA off
  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x2B, // GxGLL off
  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x02,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x32, // GxGSA off
  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x39, // GxGSV off
  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x04,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x40, // GxRMC off
//  0xB5,0x62,0x06,0x01,0x08,0x00,0xF0,0x05,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x47, // GxVTG off

You can also disable/enable NMEA sentences with a text command:

    $PUBX,40,GLL,1,0,0,0,0,0*5D

That enables the GLL sentence on the serial port.

    $PUBX,41,1,0007,0003,19200,0*25

That sets the GPS modules baud rate to 19200. Then you'll have to change the Arduino's baud rate to match. See the spec for other commands and values. Or...

Do I need to use a different library?

Yes. :slight_smile: I wrote the NeoGPS library to be smaller, faster and more accurate than all other libraries. If you really need higher update rates, NeoGPS is the best choice. It also has some ublox-specific capabilities, but I'm not sure that you need those. It will watch for an acknowledgement to ublox configuration commnds.

NeoGPS does have an NMEA send method that will calculate the checksum of these text commands for you:

    gps.send_P( &gpsPort, F("PUBX,41,1,3,3,38400,0") );

This sets the GPS device's baud rate to 38400.

Even if you don't use it, I would recommend looking at the examples for a good program structure. Many other libraries' examples will break when you try to modify them. The NeoGPS Troubleshooting page has lots of information about how to avoid some of these problems.

I would also suggest using AltSoftSerial on pins 8 & 9 for the GPS device. SoftwareSerial is very inefficient, because it disables interrupts for long periods of time. This will interfere with other parts of your sketch.

If you really can't use pins 8 & 9, you should use my NeoSWSerial. It is almost as good as AltSoftSerial, and it works at baud rates 9600, 19200 and 38400.

Cheers,
/dev