Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By seattlebiker
#93755 Hi all,
I have a question about the clever TimeAlarms library for the DS1307 RTC that is maintained by Paul Stoffregen. I am looking at the readme.txt file, and it apparently can alarm given all kinds of different situations. Except one, it seems. I need to alarm on the hour, daily, i.e., at midnight, 1AM, 2AM, etc. I haven't tried it, but I need something like this: Alarm.alarmRepeat(0-23, 0, 0, getPrecip); The reason for this is I'm in the process of building a rain gauge and I found a node-RED chart node, that can chart hourly rain amounts. It would be great if the TimeAlarms library can do this but maybe I'm stuck with just creating a function using the Time library. Ideas? Thanks!
User avatar
By Inq720
#94079 I'm not familiar with the library in question. Since it's RTC, I'm assuming you can get the time, do the Math to find the next top-of-the-hour set an alarm for that. When that alarm goes off (1) kill the first one and create your re-occurring hourly alarm.

VBR,
Inq