hello beautiful people
is there a way where i would keep track of time without rtc and ntp in my microcontroller.....
thanks already
How accurately do you need to keep the time ?
thanks UKHeliBob for your reply
i want to have all the options avaliable
Please be more specific about the accuracy required
Would 1 hour a day be good enough, or 10 minutes, 1 minute ?
What ?
1 mins
Use a timer to increment time in intervals with the required precision or greater. Let it run for two to three days and compare the time in the nodemcu and the real time. From that you can calculate an error offset to be applied every 24 hours or so. For one minute accuracy this should be more than enough.
what if my board is shut off...will it still track time?????/
No. This is not possible without an external solution. You could add a battery to backup your circuit in case of power failure.
gotta do something.....................
order an RTC from Ali..
is your NodeMCU connected to any other system?
Thinking perhaps you can grab current time from another machine, such as from the headers of an HTTP request
Just hit a reputable server such as google.com and get the time out the headers.