File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments