Closed stephensaid closed 4 years ago
OK. Two things:
I did something very stupid. This line
int weatherUpdateFrequency = 10000; // 10 seconds
should read:
int weatherUpdateFrequency = 10; // 10 seconds
Unless now() is prefixed by timezone ( myTZ.now(); ) or the time zone is set to default (myTZ.setDefault(); ), the setEvent was being set in the past (if set to 10 seconds) or in the unexpected future giving the impression that is not working.
If the setEvent is set in the past, then it fires continuously... of course, that is because we are resetting the event in the past again when firing the function being called.
A combination of the above two solved my issue.
Firstly, thank you for this library. I am finding it very useful in my current project.
I must be doing something very wrong as my setEvent is not working as expected. I have here an example sketch which should output to Serial a message every 10 seconds.
Any help is greatly appreciated.