How mmarkin/gps-ntp-timeserver works
This is an ESP8266 Wi-Fi access-point NTP server that derives time from GPS, falls back to an RTC, and serves NTP clients. The main workflow is GPS parsing and synchronization, UDP request handling and response, with OLED and LED status feedback. The README also documents Wi-Fi controls, position display, optional client display, and RTC support. Most behavior lives in src/main.cpp; excerpts omit portions of setup, synchronization, and request dispatch, so only clearly evidenced calls are linked.
Main entry points: main.cpp Time synchronization · definitions.h Hardware and settings
Components 15
Timekeeping
- GPS parsing
src/main.cpp - Time synchronization
src/main.cpp - RTC updates
src/main.cpp
Network service
- NTP packet service
src/main.cpp - Wi-Fi access point
src/main.cpp - Connection page
src/main.cpp
Status interface
- Time display
src/main.cpp - Position display
src/main.cpp - Client display
src/main.cpp - Display and Wi-Fi controls
src/main.cpp
Other components
- Clock client
- GPS receiver
- DS3231 RTC
- ESP8266 server
- Hardware and settings
include/definitions.h
Connections 16
- Clock client → Wi-Fi access point: joins network
README.md - Clock client → NTP packet service: requests time
README.md - NTP packet service → Clock client: sends NTP reply
src/main.cpp - GPS receiver → GPS parsing: provides serial data
- GPS parsing → Time synchronization: provides GPS time
src/main.cpp - Time synchronization → RTC updates: updates RTC
src/main.cpp - DS3231 RTC → Time synchronization: fallback time
- Wi-Fi access point → Connection page: routes page
src/main.cpp - Display and Wi-Fi controls → Wi-Fi access point: toggles
src/main.cpp - NTP packet service → Client display: records client
src/main.cpp - Time display → Hardware and settings: uses display setup
include/definitions.h - Position display → Hardware and settings: uses display setup
include/definitions.h - Client display → Hardware and settings: uses display setup
include/definitions.h - Time synchronization → Time display: supplies time status
src/main.cpp - GPS parsing → Position display: supplies coordinates
src/main.cpp - ESP8266 server → Hardware and settings: uses hardware definitions