In the code that follows, I want the while loop to do nothing, as long as the read_LCD_buttons() returns 1, 2, 4 or 5. And to move on if button 0 or 3 is pressed How do I do this? Using the 0 || 3, only makes the button mentioned first work. Can I have two expressions in any way? I have an lcd shield with 5 pushbuttons, attached to an uno. 0, 1, 2, 3 and 4 are physical buttons, 5 is when no button is pushed (And I also want to stay in the while loop doing nothing, when no button is pushed.) Let me know if you need more of the code to help me out.
while (read_LCD_buttons() != 0 || 3){} //Do nothing
if (read_LCD_buttons() == 0) { //If button 0 is presses, do this
lcd.print("Vanilje valgt ");
RightInput = 1;
delay(2000);
}
if (read_LCD_buttons() == 3){ //If button 3 is presses, do this
lcd.print("Kakao valgt ");
LeftInput = 1;
delay(2000);
}