Arduino Loop

My project currently needs to start the sensors at every 7am and 5pm. Is there anyway to use the loop or delay function to only start at the specific time? Or is there a function i can use to loops to start after retrieving the time from the internet?

For that sort of timing I would recommend that you get a Real Time Clock (RTC) module.

You could use millis() to manage the timing but the Arduino does not run at precisely 16MHz so it won't stay in sync with a clock over such long periods.

The demo Several Things at a Time illustrates the use of millis() to manage timing.


The best solution is to add a Real Time Clock (RTC) module to the project. No Internet connection required and they keep excellent time.

In a sense that i do not have the RTC and is unable to get one as time forbids it due to delivery time. Is there no way to check the time via the ethernet or internet?


I cant seem to find How to connect to NTP using Arduino Uno wifi as it uses a integrated ESP8266. Examples i find a mostly using ethernet or shields..