Audomatic Garage Door Close

wildbill:
Can you get anything out of the speaker elsewhere in your code? Such as the doorclose1 section?

Yes, elsewhere it seems to work fine. I can get it to beep during the override too, a steady beep (I think I can even get it to do an alternating beep). The issue I'm having is getting it to only beep every 5 minutes (for example) while the override is active.

I don't suspect, but I could be wrong, that the goto is causing any issues with this simply because during the override the goto isn't read... if it helps to eliminate the goto then I will... I'm just at a loss as to how. Would a sub-routine outside of the for(loop) work? Something like:

if (digitalRead(OverrideSW) && digitalRead(DoorOpenedSW) || CloseAttemptsVal == CloseAttempts) {
    OverrideState = true;
  }

  if (OverrideState == true) {
    override()
  }

With the sub-routine being:

void override(){

	digitalWrite(OverrideLED, HIGH);
    DoorOpenTime = 0;
    DoorState = false;
    DoorClose1 = false;
    DoorClose2 = false;
    DoorReset = false;
  } 
}

Then whenever I need the override, instead of using goto I could just call the sub-routine override()?