checks for roll over 60 seconds

Hello,

Someone could explain me what does the % in

AlarmTime += 5;
AlarmTime = AlarmTime % 60;
AlarmTime += 5; // Adds 5 seconds to alarm time
  AlarmTime = AlarmTime % 60; // checks for roll over 60 seconds and corrects
rtc.setAlarmSeconds(AlarmTime); // Wakes at next alarm time, i.e. every 5 secs

Many thanks!!

Can you explain how this is an installation and troubleshooting question?

I am sorry
Is there a way to move my post my self?

There is not.

However, report to moderator will generally get assistance.

I've taken the liberty of moving your thread to a more appropriate section.

Tanks a lot

pierrot10:
Someone could explain me what does the % in

AlarmTime += 5;

AlarmTime = AlarmTime % 60;

It keeps AlarmTime from exceeding 59.
So 60 becomes 0, 61 becomes 1, and so forth.
More info here:
https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/modulo/

pierrot10:
Hello,
Someone could explain me what does the % in

If you type 'percent symbol arduino' in google, it will come up with some details.

Eg. modulo operator. Or, as that site is saying ---- 'remainder' operator. It is based on integer division.

eg 61 % 60..... remainder is 1.

62 % 60 ----- remainder is 2.

@OP

Say, you have a watch showing MIN:SEC (Minute:Second). The SEC field is advanced by 5-sec, and it will advance this way: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55.; after next 5-sec, the display will show the time as: 01:00.How to implement this line of thought?

1. Let us have a SEC Counter named : AlarmTime with initial content of 00.

2. Wait for 5-sec and then add this 5-sec with AlarmTime: AlarmTime = AlarmTime+5 (AlarmTime +=5).

.....................................

X1. After repeated advancement by 5-sec quanta, the AlarmTime will contain 55+05 (60). This indicates that 1-MIN has elapsed. The MIN-field will hold 01 and the SEC-field will hold 00. Here, we have two components - 01 called quotient (Q) and 00 called remainder (R); these two factors have to be derived from 60 (the content of AlarmTime). The procedures could be:

(a) Divide 60(AlarmTime content) by 60 (as 60 sec makes a minute) and keep the remainder (00) without disturbing the original content of AlarmTime. This is automatically done when we execute the instruction: R = AlarmTime % 60;. Here, % is called the modulus operator and R will hold 00.

(b) Divide 60(AlarmTime content) by 60 (as 60 sec makes a minute) and keep the quotient (01 = the overflow). This is automatically done when we execute the instruction: Q = AlarmTime / 60;. Here, / is called the division operator and Q will hold 01.