I discovered that when I power up the system, sometimes it acts like the button was pressed on D2. It's just a push button, NO.
...in Setup()
attachInterrupt(0, OverrideSwitch, FALLING);//TURN ON INTERUPT OF MOMENTARY PUSHBUTTON ON PIN 2
digitalWrite(2, HIGH); //TURN ON PULLUP FOR PUSHBUTTON ON PIN 2
...
void OverrideSwitch(){
ButtonFlag = true; //set the trigger to activate the door
}
I've change the Interrupt call routine to this, but it seems a bit lame. It just checks to make sure a few seconds have passed since startup
if(millis() > 5000) ButtonFlag = true; //set the trigger to activate the door