Question: void wrong_pw(){ while (wrong_password == 2){ lcd.setCursor(0,3); lcd.print(Must Unlock With Key); delay(5000); if (pushButton == HIGH){ break; } } } This is for Arduino. I

void wrong_pw(){ while (wrong_password == 2){ lcd.setCursor(0,3); lcd.print("Must Unlock With Key"); delay(5000); if (pushButton == HIGH){ break; } } }

This is for Arduino. I have only included a section of the code as this is the issue. I want to break the while loop with the press of a push button and return to the top of the main loop. This does not work and keeps the LCD on the "Must lock with key" phrase when wrong password = 2. Everything works properly other than this. How do I fix this? Thanks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!