Is there a way to reference the month of the year to update a time used in an alarm?
The end goal is to extend the alarm as the days get longer and shorten the alarm as the sun starts setting sooner.
I'm using TimeAlarms.h and the following alarmRepeat to run two operations a day.
Alarm.alarmRepeat(6, 00, 0, OpenDoor); // 6:00am every day
Alarm.alarmRepeat(18, 30, 0, CloseDoor); // 6:30pm every day
I'd like to change the hour or minutes of the alarm based on the month.
For example, the CloseDoor function should be run at different times depending on the month:
January: Hour = 17, Minute = 30
March: Hour = 18, Minute = 00
July: Hour = 18, Minute = 30
Any thoughts on how to use a reference to today's month to determine when the alarm should run?