This project uses an M5STACK CORE2 V1.1 SoC together with a Waveshare LC76G GNSS Module to display Satellite data.
On the left side of the picture you see the Waveshare LC76G GNSS Module and on the right side the CORE2 V1.1 SoC, which displays the satellite data, both connected by four wires.
The display shows on the left from top to bottom:
- an Off button to power off the system
- the altitude im meters above sea level: 419 m asl
- the latitude: 49° 28.195505′ N
- the longitude: 008° 45.360648′ E
- the date: 14. August 2026
- the time: 13:42.43 UTC
- the nr of satellites: 29
on the right:
- the velocity in km/h
- a compass showing the direction of movement
The display is updated every second.
This is my first project using the CORE2 system. Its size is 5.4 x 5.4 x 1.65 cm. In this project I’m using the display and the touch screen – no microphone, no vibration, no speaker sounds.
It can be switched on and off and it can be charged with a USB-C charger – nothing more.
Use Cases
Time Reference
The system shows the precise date and time.
You can use it to set your analog clocks and watches.
Find your Position
The system shows the latitude and the longitude of its position. In addition it shows the altitude in meters above sea level (m asl).
You can use it to find out where you are, e.g. when you are on a hiking or trekking tour.
Find your Direction of Moving
With the compass on the right side you see in which direction you are moving. This is only updated, when you are moving with a velocity which is higher than 2 km/h.
You can use it to find out in which direction you are going or driving. It even serves as a compass while you are moving.
Find your Velocity
In the upper right corner your velocity is shown.
You can use it to check whether the speed display in your car is calibrated.
Where you can get it
The Hardware can be found on the internet, the software is available at Github:
https://github.com/elrebo-de/core2_gnss_display.git
Under the Hood
The Waveshare LC76G GNSS Module receives the satellite signals and as soon as it has enough information it signals the availability on a PPS (puls per second) pin and transmits the data through a UART connection to the SoC.
The standard setting of the LC76G is to send one puls per second. The standard baud rate of the UART is 115200 baud.
In this project we do not need to transmit commands to the LC76G GNSS module, because we use the standard configuration. Therefore we only have to connect four lines and we can use the Grove port at the left side of the CORE2 SoC.
The project uses the component elrebo-de/generic_button to listen for the PPS signal. It uses an instance ppsSignal of C++ class GenericButton, which triggers a callback function each time the PPS signal is detected (so once every second).
For every PPS signal a BUTTON_SINGLE_CLICK event is triggered and the function ppsSignalCb is called.
To receive the GNSS data it uses the component elrebo-de/generic_uart. It uses an instance gnssUart of C++ class GenericUart, which configures the UART driver for receiving the messages sent by the LC76G GNSS module. All messages, which are sent out from the LC76G GNSS Modul every second are received from the UART with the method
std::string allMessages = gnssUart.readString(100);
The parameter timeoutMs sets the maximum time the method waits for data. Because it is called directly after the PPS signal, data is always available.
In this Log snippet you see (from 1941 ms on), that every second the callback function for PPS signal is called, and 100 ms later the received data is written to the log.
I (541) main_task: Calling app_main()
I (1041) CORE2 GNSS Display: Configure GenericUart gnssUart
I (1041) gnssUart: constructor
I (1041) gnssUart: UART_HW_FIFO_LEN(2): 128
I (1041) CORE2 GNSS Display: Configure GenericButton ppsSignal
I (1041) ppsSignal: Button Type GPIO
I (1051) button: IoT Button Version: 4.1.7
I (1051) ppsSignal: RegisterCallbackForEvent called
I (1051) CORE2 GNSS Display: Configure Display
I (1061) LVGL: Starting LVGL task
W (1061) i2c.master: Please check pull-up resistances whether be connected properly. Otherwise unexpected behavior would happen. For more detailed information, please read docs
I (1101) M5Stack: Install panel IO
I (1101) M5Stack: Install LCD driver
I (1101) ili9341: LCD panel create success, version: 2.0.2
I (1261) M5Stack: Setting LCD backlight: 100%
I (1941) CORE2 GNSS Display: Callback for PPS signal called!
I (2041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, latitude: 49° 28.206138' N, longitude: 008° 45.355541' E, date: 14.08.26, time: 13:04:10, nrOfSats: 25
I (2941) CORE2 GNSS Display: Callback for PPS signal called!
I (3041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (3941) CORE2 GNSS Display: Callback for PPS signal called!
I (4041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (4941) CORE2 GNSS Display: Callback for PPS signal called!
I (5041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (5941) CORE2 GNSS Display: Callback for PPS signal called!
I (6041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (6941) CORE2 GNSS Display: Callback for PPS signal called!
I (7041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (7941) CORE2 GNSS Display: Callback for PPS signal called!
I (8041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ... I (8941) CORE2 GNSS Display: Callback for PPS signal called!
I (9041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, ...
I (9941) CORE2 GNSS Display: Callback for PPS signal called!
I (10041) CORE2 GNSS Display: speed: 0, angle: 173, altitude: 415, latitude: 49° 28.206041' N, longitude: 008° 45.355577' E, date: 14.08.26, time: 13:04:18, nrOfSats: 25
Questions or Ideas for Improvement?
I’m happy to discuss!

Leave a Reply