Interrupt every 30 minutes [SOLVED]

Hello for my clock I need an interrupt every 30 minutes, exactly when the hour turns and 30 minutes later.
(So 00:00, 00:30, 1:00 upto 23:30 hour)

I use an DS3231 shield and use the RTClib library.
I know I can use the INT-pin of the DS3231-shield, but don't know how to program the alarm excactly each whole and half hour.

What is the simpliest way to create an interrupt (to sound the bell)?

Do you really need to use an interrupt ?

You have the current minute from the RTC so will know when 30 minutes have passed and can then do whatever you need with the bell

The use of an interrupt makes it easier to handle my bell strike routine (1 to 12 times or 1 time on the half hour).

(minute ==0 and second ==00) is valid during a whole second,

(minute ==0 and second ==00) is valid during a whole second,

Don't detect when minute is zero, instead detect when it becomes zero

See the StateChangeDetection example in the IDE

Not sure if you mean "interrupt" as the ususal tecnical term in programming.

Interrupt means stop execution of the current code regardless of what this code is doing right now

run down the code of the interrupt-service-routine then go on with whatever the code was interrupted at.

ISR usually are used if you need a reaction in less than 0,1 milliseconds.
Now starting your bell doesn't have to be accurate down to 0,0001 seconds.
Post your code to show what your code is actually doing.
If your main-loop needs more than 0,1 secnds to run through completely the interrupt won't help much.
In every case it does not help if you are using a display or some other additional hardware.

Trying to use an interrupt for something that takes more time than 10 milliseconds is the badest idea of all.

If your loop needs more than 0,1 seconds to run through completely this can only be by using the function delay()
Then it is about time to switch over from blocking timing based on function delay()
to NON-blocking timing based oon function millis()

I'm speculation. Post your code so that the forum-users can analyse what your code is doing

best regards Stefan

First result from the Google.

I'm not familiar with that library, but in general, you would set the alarm time to look at minutes and seconds, with the first one at 00:00. You would have the INT/SQW pin connected to a digital input pin on the Arduino, and add a line in your loop that checks to see if that pin has gone low, which means the alarm has triggered. Then you would change the alarm time to 30:00 and clear the alarm flag, which would make the input pin go back high. The next time you would set it back to 00:00.

It might be possible to use both alarms, setting one to 00:00 and the second one to 30 minutes (the second alarm doesn't have seconds). I haven't tried that, but it might work. Then you would only have to clear the alarms when either one triggers.

Thank you gentleman for your suggestions.
I will introduce set a state-signal, do the job (ringing the bell) and reset the state-signal.