gmag11 / ESPNtpClient

High accuracy NTP library for ESP32 and ESP8266
MIT License
118 stars 25 forks source link

ESP8266WiFiMulti.h #28

Closed stoffel2 closed 2 years ago

stoffel2 commented 2 years ago

Hi,

Thanks for the really great library which I use to synchronize multiple devices. I've had to switch to the dev branch and have not gotten it to work with ESP8266WiFiMulti.h. Perhaps the connect events are not being seen.

Best Regards,

Chris

gmag11 commented 2 years ago

Hi. Maybe you can try to use basicExample code: https://github.com/gmag11/ESPNtpClient/blob/main/examples/basicExample As this does not use events to start sync you may get wrong time until device gets connected to the Internet.

stoffel2 commented 2 years ago

Hi, I've gotten WiFiMulti to work in the dev branch using ideas from the advancedExample. I discovered that putting any code such as a delay(1000) after NTP.begin(ntpServer) in my void setup reliably caused the a seg fault (for whatever reason), which I had mistakenly attributed to MiFiMulti. Regarding connectivity: I make sure my device gets synced using your event handler, which is very convenient.

Thanks again!

Chris

gmag11 commented 2 years ago

As I understand you solved your problem I close this issue. Feel free to reopen it if needed. Thanks.