Skip to content

Commit 5c12bf6

Browse files
authored
Kii.ino
1 parent 5f03209 commit 5c12bf6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Kii.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void loop()
4444
char buttonRight = (button & BUTTON_RIGHT) ? '<' : '.';
4545
char buttonDown = (button & BUTTON_DOWN) ? 'v' : '.';
4646
char buttonUp = (button & BUTTON_UP) ? '^' : '.';
47-
char lockDoor = (button & BUTTON_A && button & BUTTON_B);
47+
char lockDoor = (button & BUTTON_A && button & BUTTON_B); //To lock the door press a and b at the same time
4848

4949
Serial.println(buttonA);
5050
Serial.println(buttonB);
@@ -58,13 +58,13 @@ void loop()
5858
if (button & passwordSequence[currentStep]) // Correct button pressed for the current step
5959
{
6060
Serial.print("Correct button pressed: ");
61-
currentStep++; // Move to the next step in the password sequence
61+
currentStep++; // Move to the next step in the password sequence
6262

63-
if (currentStep == 4) // Password sequence is complete (A -> B -> ONE)
63+
if (currentStep == 4) // Password sequence is complete (A -> 1 -> 2 -> B)
6464
{
6565
Serial.println("Password sequence entered! Hello!");
6666
myServo.write(180);
67-
currentStep = 0; // Reset sequence after completion
67+
currentStep = 0; // Reset sequence after completion
6868
}
6969

7070
if (lockDoor) {

0 commit comments

Comments
 (0)