I was wondering, by the time I press the following key, it does not return to the main_screen() function. How can I fix my code?
void loop()
{
int exit = 0;
char input = customKeypad.getKey();
main_screen();
if (input=='A')
{
delay(100);
lcd.clear();
do{
lcd.setCursor(1,0);
lcd.print("Enter minutes: ");
if (input=='B')
{
break;
lcd.clear();
}
}
while(1);
}
}