After browsing through some forums, I found out that the simplest way to do this is with a while loop.
I am running the buttons using the built in pullup resistor so the the button is not pressed when HIGH and pressed when LOW. From what I understand, when the while loop condition is not true(so the button is pressed) it should end the loop and continue with the rest of the code. This isn't happening for me.
int bluebutton = 11;
int redbutton = 12;
void setup() {
// put your setup code here, to run once:
pinMode(redbutton, INPUT_PULLUP);
pinMode(bluebutton, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly
while(digitalRead(bluebutton == HIGH or redbutton == HIGH)){
lcd.print("Which mode would you");
lcd.print(" like to play?");
delay(4000);
lcd.clear();
lcd.print("Press red for singleplayer and blue for 2-player.");
delay(3000);
}
//When the while loops condition is not true, the loop should break and continue with the rest of the code.
}