A simple library for interfacing with the LC76G GPS module. This library provides basic functionality for configuring the LC76G GPS module using the Arduino framework.
- Configurable update rates (100ms to 1s)
- Adjustable baud rates (4800 to 115200)
- Support for different startup modes (hot, warm, cold start)
- Checksum calculation and verification
- Simple serial interface
Refer to the LC76G chip GNSS protocol for more information URL: https://files.waveshare.com/upload/0/06/Quectel_LC26G%26LC76G%26LC86G_GNSS_Protocol_Specification_V1.0.0_Preliminary.pdf
- Open your project
- Add the following to your
platformio.ini
:
lib_deps =
https://github.com/walloutlet/LC76G.git
mikalhart/TinyGPSPlus@^1.1.0
Feel free to use the TinyGPS library of your liking.
- Download this repository
- Extract into your libraries folder
#include <LC76G.h>
#include <TinyGPS++.>
// Initialize the LC76G GPS hardware
LC76G lc76g(&Serial2);
// Initialize GPS object
TinyGPSPlus gps;
void setup() {
// Initialize GPS on pins 16(RX) and 17(TX) at 115200 baud
lc76g.begin(16, SERIAL_8N1, 17, 115200);
// Set update rate to 1Hz (1000ms)
lc76g.setUpdateRate(1000);
}
void loop() {
// Process GPS data
while (Serial2.available() > 0) {
gps.encode(Serial2.read());
}
// Code to process GPS data
}
Usage example assumes you are using the default Serial2 port on ESP32 chip.
Tested using Waveshare LC76G GNSS Module Product URL: https://www.waveshare.com/lc76g-gnss-module.htm Wiki URL: https://www.waveshare.com/wiki/LC76G_GNSS_Module
- 100ms (10Hz)
- 200ms (5Hz)
- 300ms (3.33Hz)
- 400ms (2.5Hz)
- 500ms (2Hz)
- 600ms (1.67Hz)
- 700ms (1.43Hz)
- 800ms (1.25Hz)
- 900ms (1.11Hz)
- 1000ms (1Hz)
- 4800
- 9600
- 19200
- 38400
- 57600
- 115200
- 1 (Hot)
- 2 (Warm)
- 3 (Cold)
This library is licensed under the MIT License. See the LICENSE file for details.