I would like to execute a certain set of commands (e.g., turning off a relay) in my Arduino program when a certain time elapses (e.g., 20 minutes) from the moment when the program starts execution as a safety mechanism.
What is the easiest way to do this?
I read about Timers in Arduino Mega but I think 20 minutes is too long to use timers. I saw that there is External Real-Time Clock modules (like DS3231 AT24C32 IIC High Precision Real Time Clock Module).
Any suggestions would be appreciated.