case idle:
if (voltageA0 > 1.0 || voltageA1 < 2.0 || voltageA2 > 3.5) {
digitalWrite(7, HIGH);
delay(5000);
digitalWrite(7, LOW);
delay(0);
if (voltageA0 > 1.0) {
theState = case1;
}
if (voltageA1 < 2.0) {
theState = case2;
}
if (voltageA2 > 3.5) {
theState = case3;
}
}
EDIT: To clarify original answer, I inlined the "warning" code and deleted the "case warning", as obviously this state is not longer needed.