Switching a relay on & off using a momentary push button

Add after this line in setup:

  // initialize switch pin (2) as an input:
  pinMode(SwitchPin, INPUT);
digitalWrite (SwitchPin, HIGH); // enable internal pullup resistor - open switch will now go high