jlab-sensing / ENTS-node-firmware

Firmware for STM32 and ESP32 microcontrollers on the Soil Power Sensor board
MIT License
0 stars 3 forks source link

Example NTP server #121

Open jmadden173 opened 1 month ago

jmadden173 commented 1 month ago

Describe the Enhancement I would like to an example pio environment that connects to WiFi and queries a NTP server for the current timestamp and stores it as a unix epoch in uint32 format. Down the the second is sufficient, no need for ns.

Benefits Allow for future time synchronization through the WiFi interface for accurate timestamp of measurements.

Possible Drawbacks N/A

Additional Context Looks like there's already a NTPClient library for Arduino (https://registry.platformio.org/libraries/arduino-libraries/NTPClient). I saw this as the most popular one on platformio. There should be instruction for adding the library to the project on the link I provided.