I'm confused by dhenry's answer.
Your original question was how to show 5 screens by pushing one button?
This shows the general idea. It outputs to serial so you can test by just grounding pin 8 (to act as your switch).
const byte mySwitch = 8;
// these "states" are what screen is currently being displayed.
typedef enum
{
POWER_ON, COOLANT, INTAKE_SPEED, EXHAUST_FAN1, EXHAUST_FAN2,
// add more here ...
LAST_STATE // have this last
} states;
byte state = POWER_ON;
byte oldSwitch = HIGH;
void powerOn ()
{
Serial.println ("Welcome!");
}
void showCoolant ()
{
Serial.println ("Coolant level = x");
}
void showIntakeSpeed ()
{
Serial.println ("Intake speed = x");
}
void showExhaustFan1 ()
{
Serial.println ("Exhaust Fan 1 = x");
}
void showExhaustFan2 ()
{
Serial.println ("Exhaust Fan 2 = x");
}
void setup ()
{
pinMode (mySwitch, INPUT_PULLUP);
Serial.begin (115200);
powerOn ();
} // end of setup
void loop ()
{
byte switchValue = digitalRead (mySwitch);
// detect switch presses
if (switchValue != oldSwitch)
{
delay (100); // debounce
// was it pressed?
if (switchValue == LOW)
{
state++; // next state
if (state >= LAST_STATE)
state = COOLANT;
switch (state)
{
case POWER_ON: powerOn (); break;
case COOLANT: showCoolant (); break;
case INTAKE_SPEED: showIntakeSpeed (); break;
case EXHAUST_FAN1: showExhaustFan1 (); break;
case EXHAUST_FAN2: showExhaustFan2 (); break;
} // end of switch
} // end of switch being pressed
oldSwitch = switchValue;
} // end of switch changing state
} // end of loop