Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
A Slightly Better NTP Client for the ESP8266
Was not really happy with the NTP clients for the ESP8266 because, after a few years of game engine programming, I am not a fan of a lot of code and delays in the main loop, so here is a "slightly better NTP client" for the ESP8266.
In a nutshell, instead of having a delay in the main loop as a part of the main code, I move the main code out of the main loop and use a simply modulo function to set the interval in the main loop. This kind of programming has some advantages, in that it is easier to add more functionality to the main loop. I'm sure they are even better ways to to this with other kinds of timers and interrupts, but this works OK. If you have a better way, please modify and post your improvements.
Hi....You can keep local time with the TimeLib.h library. This runs from the processor's clock. You use NTP time from the network to periodically "true up" your local time. See TimeNTP example in the Time library and NTPClient in the ESP8266WiFi libarary.
Currently have two ESP8266 modules testing some Blynk apps, whereI'm not so happy with the Blynk business model for developers, but that's another story.
So, with two of my ESP8266s currently "busy", I decided to work on the ESP32, and in particular the ESPWROOM32.
I installed the... (0 Replies)
Hi,
I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local?
# ntpq -p
... (3 Replies)
hi all
ntp client side configuration file is done but in
# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
ntpserver .INIT. 16 u - 64 0 0.00 0.000... (5 Replies)
Hi, I am trying to configure NTP client on my Solaris server, but I am getting error like:
Jan 13 10:53:33 SPOTS ntpdate: no server suitable for synchronization foundMy ntp.conf file:
bash-3.00# pwd
/etc/inet
bash-3.00#
bash-3.00#
bash-3.00# cat ntp.conf
# ident "@(#)ntp.client... (5 Replies)
All,
I need to write a script which can determine if my NTP client is X second off from the NTPD server time. I am looking for a crafty oneliner to calculate the time difference? (3 Replies)
Hello All
I have a problem about ntp, I am install a ntp server on a fedora 11 machine and I have 8 ntp client (solaris 10) everything working fine but just a server can not sync time . I have receive this error message
-bash-3.00# ntptime
ntp_gettime() returns code 5 (ERROR)
time... (1 Reply)
All,
How do you set a Solaris 9 server which received ntp updates from a ntp server to broadcast them on a local subnet. I have created a /etc/inet/ntp.conf file to receive the updates from a server on network and need to make this server become like a ntp relay from the main server.
Any... (1 Reply)
All,
I have a Windows XP client which I need to get time synchronized from a Linux ntp server. What are the commands to perform the setup and configuration?
Thanks,
Mike (1 Reply)