 #define ONE_BUTTON P1_1
 #define ZERO_BUTTON P4_5
 
-const uint16_t code = 0b10100111001;
-const byte size = 11;
+#define MAX_CODE 6
 
-const unsigned int debounce_time = 40; // ms
+const bool code[] = {1, 0, 0, 1};
 
+const unsigned int debounce_time = 200; // ms
+
+const byte code_size = sizeof(code);
 byte code_idx = 0;
 
-enum State { LOCKED, PARTIAL, UNLOCKED };
+enum State {LOCKED, INCORRECT, PARTIAL, UNLOCKED};
 
 State state = LOCKED;
 

	change(LOCKED);
}

void loop() {
}

	code_idx = 0;
}

void incorrect() {
	code_idx++;
}

void partial() {
	code_idx++;
}
