I am having trouble parsing NMEA sentences coming from a GY-NEO6MV2 board (https://www.cytron.io/p-gps-neo6mv2), using the TinyGPS (https://github.com/mikalhart/TinyGPS) library. The GPS board itself is connected to an Arduino Pro Mini 3v3 8MHz (ATmega328)
First of all, to start debugging I want to disable all NMEA sentences other than GGA and RMC (which are the only ones I need for this project)
According to the manual, this can be done by sending PUBX commands through the SoftwareSerial (no need for binary UBX)
I am doing this in the following way
#include <SoftwareSerial.h>
#include <TinyGPS.h>
// GPS SoftwareSerial
// Shares pins with (MISO 12/ MOSI 11) used for SPI
#define GPS_RX_PIN 12
#define GPS_TX_PIN 11
TinyGPS gps;
SoftwareSerial GPSSerial(GPS_RX_PIN, GPS_TX_PIN);
void setup()
{
Serial.begin(115200);
GPSSerial.begin(9600);
GPSSerial.print("$PUBX,40,GLL,0,0,0,0*5C\r\n");
GPSSerial.print("$PUBX,40,ZDA,0,0,0,0*44\r\n");
GPSSerial.print("$PUBX,40,VTG,0,0,0,0*5E\r\n");
GPSSerial.print("$PUBX,40,GSV,0,0,0,0*59\r\n");
GPSSerial.print("$PUBX,40,GSA,0,0,0,0*4E\r\n");
}
void loop()
{
// ...
}
However, the GPS board will not respond to these commands and keep sending all the NMEA sentences.
FWIW, this is the original code I'm building my project on - https://github.com/billygr/arduino-aprs-tracker/blob/master/arduino-aprs-tracker.ino
Any thoughts would be appreciated...