Check for a particular Time to fire an event

Hi,

I am looking for the best way to trigger an event at a particular time of day or even at a particular day. Say every Monday at 8pm. Is there a preferred way to do this?

My thoughts are with Time.day() == the day I want to fire, Time.hour() == etc…

I think @BulldogLowell has had a library for that and there also is this
https://build.particle.io/libs/TimeAlarms/0.0.3/tab/example/TimeAlarmsExample.ino

2 Likes

@frlobo, as @scruff mentioned have a look at Timer2 in this example:

@ScruffR, I’m in the process of completely refactoring this lib to use start/end callbacks. the original was just me converting my original from Arduino, I’ve re-shaped its use.

The Arduino is already updated, I still need to finish some simple constructors, refactor for Particle’s time library and put into new library format.

2 Likes

You could use IFTTT to ping your device using the date&time module. That’s an extra service to configure, but then you can easily update the timing if necessary without modifying your firmware.

2 Likes

Thank you everyone for your help!

@BulldogLowell will give it a shot! Thanks

1 Like