arduino-libraries / NTPClient

Connect to a NTP server
542 stars 372 forks source link

How to use this library with an ESP-01? #81

Open modest1981 opened 4 years ago

modest1981 commented 4 years ago

Hello, Anybody can help how to use this library with ESP-01 via Hardserial or Softserial?

rprediger commented 4 years ago

Use the "WiFiEsp" library (easily find several tutorials) and then configure it like this:

#include <WiFiEsp.h>
#include <WiFiEspUdp.h>
#include <NTPClient.h>
...
WiFiEspUDP ntpUDP;
NTPClient timeClient(ntpUDP);

I'm starting to use it, I hope it helps you