Using a RTC to take readings

However a word of caution. When the time is (say) 10:05, then the "5 minutes are up" will happen thousands of times (until it becomes 10:06). You also need to check if the time has changed (eg. if the minute now is different from the minute a moment ago).