Interrupts getting ignored

6v6gt:
You'll have to deal with that problem an example of which is in #21.

In the meantime:

  1. add a print statement after the Serial.begin(9600) so you can see if the system is restarting.

  2. post the code that you are now using. You have surely made changes since your first post.

  3. explain exactly what you are doing. It looks like you are setting a timers so a motor start at a particular hour (or minute) and switches off at a particular time, but you appear to be setting only one counter chiran.

1)Well I have to try this, but I guess problem is not there in restarting of program

  1. I am using exactly the same code which I have posted and I haven't made any changes in it yet.

  2. This is what I expect to get done:

A) Motor turns ON (there is no any specific requirement for when to turn ON the motor for the very first time when the system is initiated)

B) Once the motor is ON its ON time should be able to varied from 2 mins to 16 mins max. (the user will decide it for how much time the motor remains ON min is 2 mins and max is 16 mins. The user should be able to vary the time for which the motor remains ON, only when the motor is turned ON)

C) After getting the time from user, turn the motor of after the set minutes.

D) After the motor is turned OFF, It should be turned ON again after 2 hours.

Note: all of this working should have no effect of the power failures. What I am trying to say is consider a situation where motor is turned OFF and there is a power failure. The power resumes after one hour, now the system should compensate this one hour and start the motor again ON after one hour for now, since there was a power failure for one hour