Most GPS sensors have an update rate of approximately 1-10 Hz. An update interval of 50 ms is on the high side, so reduce it to at least 1000 ms. The only thing that changes is how often the already read data is processed by fetchSensorGPS.
Note that gps.encode() will still process data at the same rate (whenever data is available in the buffer).
Most GPS sensors have an update rate of approximately 1-10 Hz. An update interval of 50 ms is on the high side, so reduce it to at least 1000 ms. The only thing that changes is how often the already read data is processed by
fetchSensorGPS
.Note that
gps.encode()
will still process data at the same rate (whenever data is available in the buffer).