NTP, or Network Time Protocol, is a system used to synchronize the clocks of devices over a network.
How It Works:
Time Servers: NTP servers are special computers connected to precise clocks (like atomic clocks). These servers know the exact time.
Client Requests: A device (like your computer or phone) asks the NTP server for the current time.
Synchronization: The server sends the time back to the client. The client then adjusts its clock to match the server's time.
Accuracy: NTP is very accurate. It can adjust a device's clock to within milliseconds (thousandths of a second) of the correct time, even over the internet.
Hierarchy: NTP uses a system of “stratum” levels. A Stratum 1 server gets its time directly from a highly accurate source, like an atomic clock. Stratum 2 servers get their time from Stratum 1 servers, and so on. This hierarchy helps distribute accurate time across networks.
In essence, NTP helps keep all devices on a network “in sync” by ensuring they all have the correct time, which is crucial for many computer systems, devices and networks.
Enabling NTP allows your BLOX device to know the actual real world time with millisecond precision. Perfect for scheduling time related tasks or timestamping your datalogging with
You do need Wifi connectivity to request the current time (and regular timesync updates) from the NTP servers, so make sure to set up Wifi, then add the “Set time using NTP” block to your BLOX Initilization section. Set your timezone using the dropdown. You can usually use the default servers, but it is configurable if you are in a setup where you need to use specific time servers
When you have time set, you can schedule tasks to run on certain days/times.
In the example shown here, we are turned a switched output on in the morning and off at night , only on weekdays.