   22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53
 };       // an array of pin numbers to which LEDs are attached
 int pinCount = 32;
+
+#define PIN_DETECT_1 2
+#define PIN_DETECT_2 3
+#define PIN_DETECT_3 4
+#define PIN_DETECT_4 5
+#define PIN_DETECT_5 6
+#define PIN_DETECT_6 7
+Bounce debounce1 = Bounce();
+Bounce debounce2 = Bounce();
+Bounce debounce3 = Bounce();
+Bounce debounce4 = Bounce();
+Bounce debounce5 = Bounce();
+Bounce debounce6 = Bounce();
+
 
 void setup_ethernet() {
 

  if (!client.connected()) {
    reconnect();
  }
  client.loop();
}


    digitalWrite(relayPins[thisPin], relayStates[thisPin]);
  }


  //input
  pinMode(PIN_DETECT_1, INPUT_PULLUP);
  pinMode(PIN_DETECT_2, INPUT_PULLUP);
  pinMode(PIN_DETECT_3, INPUT_PULLUP);
  pinMode(PIN_DETECT_4, INPUT_PULLUP);
  pinMode(PIN_DETECT_5, INPUT_PULLUP);
  pinMode(PIN_DETECT_6, INPUT_PULLUP);
  debounce1.attach(PIN_DETECT_1);
  debounce2.attach(PIN_DETECT_2);
  debounce3.attach(PIN_DETECT_3);
  debounce4.attach(PIN_DETECT_4);
  debounce5.attach(PIN_DETECT_5);
  debounce6.attach(PIN_DETECT_6);
  debounce1.interval(50);
  debounce2.interval(50);
  debounce3.interval(50);
  debounce4.interval(50);
  debounce5.interval(50);
  debounce6.interval(50);


  digitalWrite(13, LOW);
  delay(500);
  digitalWrite(13, HIGH);
