Kitchen Timer with Relay and Magnetic Switch

PaulS:

    if (minutes == 0 & seconds == 0)

{
      //do nothing
    }



Do nothing? I thought you wanted to turn the relay off.

Yeah, I do, but it wasn't doing anything earlier when it was part of a loop statement. When I changed the HIGH to LOW's, I saw that the relay LED was flickering occasionally.

PaulS:

  if (digitalRead(MagSwitch) == LOW){ //if magnetic switch is detected

else if (digitalRead(MagSwitch) == HIGH) //if no magnetic switch detected



If the output from digtialRead() isn't HIGH and it isn't LOW, what is it?

No Serial.print() statements outside of setup(). I'm sure that there is a reason for that, but what it could possibly be escapes me.

I added some Serial.println() statements to debug earlier, making sure the switch was working and that my timer was correct. Is it bad to keep it in the setup right now?

Thanks for the advice