#include <Arduino.h>
#include <Wire.h>
#include <HardwareSerial.h>
HardwareSerial gpsSerial(1);
#define GPS_RX 12
#define GPS_TX 14
#define ENABLE_PIN 16
#define ENABLE_PIN_ACTIVE_LOGIC HIGH
uint32_t lastQueryMillis = 0;
void setup() {
Serial.begin(9600);
gpsSerial.begin(9600, SERIAL_8N1, GPS_RX, GPS_TX);
sensorKit.begin();
sensorKit.initGPS(&gpsSerial);
}
void loop() {
if (millis() - lastQueryMillis >= 5000) {
lastQueryMillis = millis();
sensorKit.run();
Serial.print("[GPS FIX] ");
trace_all(Serial, *(sensorKit.getGPSObject()), sensorData.
gpsFix);
}
}