I’ve tried it in many ways but i can’t set my GPS to 10hz.
What i try:
gpsPort.write("\xB5\x62\x06\x08\x06\x00\x64\x00\x01\x00\x01\x00\x7A\x12\xB5\x62\x06\x08\x00\x00\x0E\x30");
Full code:
#ifndef GPSport_h
#define GPSport_h
#include <AltSoftSerial.h>
AltSoftSerial gpsPort; // 8 & 9 for an UNO
#define GPS_PORT_NAME "AltSoftSerial"
#define DEBUG_PORT Serial
#endif
#include <NMEAGPS.h>
#include <ublox/ubxNMEA.h>
#include <GPSport.h>
#include <NeoTeeStream.h>
ubloxNMEA gps;
static void poll() {
#if defined( NMEAGPS_PARSE_PUBX_00 )
gps.send_P( &gpsPort, F("PUBX,00") );
#endif
#if defined( NMEAGPS_PARSE_PUBX_04 )
gps.send_P( &gpsPort, F("PUBX,04") );
#endif
}
void setup() {
Serial.begin(9600);
Serial.println(F("Date | Time | Latitude | Longitude \n"));
Serial.flush();
gpsPort.begin(9600);
delay(1000);
gpsPort.write("\xB5\x62\x06\x08\x06\x00\x64\x00\x01\x00\x01\x00\x7A\x12\xB5\x62\x06\x08\x00\x00\x0E\x30");
delay(1000);
poll();
}
void loop() {
while (gps.available(gpsPort)) {
gps_fix fix = gps.read();
if (fix.valid.time && fix.valid.location) {
//SHOW DATA
} else {
Serial.println("Não há nenhum dado válido!");
}
poll();
}
}
My GPS documentation:
https://nettigo.pl/attachments/378
Serial Monitor:
18:03:41.449 → 18/10/19 | 21:03:42.00 | -21.211485 | -50.449501
18:03:42.469 → 18/10/19 | 21:03:43.00 | -21.211473 | -50.449501
18:03:43.457 → 18/10/19 | 21:03:44.00 | -21.211470 | -50.449501
18:03:44.469 → 18/10/19 | 21:03:45.00 | -21.211470 | -50.449497
18:03:45.452 → 18/10/19 | 21:03:46.00 | -21.211468 | -50.449501