Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started