dalai

In this sketch I need to add a command ,so I can stop TimeAlarm triger spinning() every time i reset timer (or I add hours with a seccond button).I need spinning triggered 60 sec after turn on or reset and after that ,every hour.thank you

/*=========== GENERAL reset pin. Everithing resets to zero when presed=============*/

if(digitalRead(resetPin) == HIGH){ Resetingeverithing ();//command to turn off Alarm.timers setTime(0,0,0,1,1,11); //at this point Alarms are trigered always//command to turn on Alarm.timers }//end of reset } //END of LOOP

void Resetingeverithing () {

Alarm.delay (2000); lcd.clear(); lcd.print("timer will be set back to zero"); //going back to loop }

I am not clear what you want to do exactly, and your current code does nothing as far as I can see, apart from constantly setting the time to the same values every time through loop(). The alarms will not trigger because you have no call to Alarm.delay() in loop() and even your Resetingeverithing() function does nothing but wait 2 seconds, clear the LCD and then print a message.

If you want to turn alarms on and off you need to know their ID, which you get like this

/*=========== GENERAL reset pin. Everithing resets to zero when presed=============*/

if(digitalRead(resetPin) == HIGH){ Resetingeverithing ();//command to turn off Alarm.timersdisable(ID);disable(ID2); setTime(0,0,0,1,1,11); //at this point Alarms are trigered always//command to turn on Alarm.timersenable(ID);enable(ID2); }//end of reset } //END of LOOP

void Resetingeverithing () {

Alarm.delay (2000); lcd.clear(); lcd.print("timer will be set back to zero"); //going back to loop }