 		buttonEvent = millis();
 		previousButtonState = button;
 	}
-	if (button == pressed)
+	if (button == BUTTON_PRESSED)
 	{
 		unsigned long t = millis() - buttonEvent;
 		if (t >= 15000 && t <= 15100)


EthernetUDP udp;

const bool open = true;
const bool close = false;

bool previousDoorState = close;
bool previousButtonState = true;

const bool pressed = false;
const bool released = true;

int doorEvent = 0;


	{
		unsigned long time = millis() - buttonEvent;

		if (button == BUTTON_RELEASED)
		{
			// force door unlock in case of staying in wrong state
			if (time > 15000)
