 
 int arglen[256] = {};
 
-#define TRAY_OPEN 1
-#define TRAY_CLOSED 0
+#define TRAY_OPEN 0
+#define TRAY_CLOSED 1
 
 #define LOADER_REST 1
 #define LOADER_ACTIVE 0

int kcup_tray_close() {
  digitalWriteFast(PIN_TRAY_PISTON, TRAY_CLOSED);
  if (tray_state != TRAY_CLOSED) {
    delay(500);
  }
  tray_state = TRAY_CLOSED;
  return 0;

  digitalWriteFast(PIN_KCUP_LOADER, LOADER_REST);
  digitalWriteFast(PIN_KCUP_EJECTOR, EJECTOR_OFF);
  digitalWriteFast(PIN_TRAY_PISTON, TRAY_CLOSED);
  digitalWriteFast(PIN_BREW_BUTTON, 0);

  Serial.begin(9600);

