Call a function once a second using the time() library?
Posted: Sat Mar 03, 2018 8:36 pm
My code is heavily based on this example of receiving the time from the internet: https://github.com/espressif/arduino-es ... leTime.ino I'd like to call a function whenever the second increments. I'm using to get the time and it's counting up in the background, so I'm wondering if there's something there that I can attach an interrupt to. Is this possible?
My alternative is to create a one second hardware timer interrupt and call the function there but I'd rather have my function exactly track the time.
Thanks in advance!
Dillon
Code: Select all
time(NULL)
My alternative is to create a one second hardware timer interrupt and call the function there but I'd rather have my function exactly track the time.
Thanks in advance!
Dillon