Let's start with the obvious stuff.
case LED7_IN_OUT:
{
static unsigned long startTime;
static int pwmLevel = 0;
static int pwmIncrement = 1;
unsigned long period = 5;
if (currentTime - startTime >= FIVESECS)
{
currentState = ALL_FADE_DOWN_TOGETHER;
Serial.println("Fading all down together");
startTime = currentTime;
setPwmLevelForLed7(0);
}
}
break;
You never set currentState to LED7_IN_OUT so the program will never enter that state and execute the code for it.
Even if you did, look at the code for the state (above). It calls the setPwmLevelForLed7() function
void setPwmLevelForLed7(byte pwmLevel)
{
for (int ledIndex = 0; ledIndex < LEDCOUNT; ledIndex++)
{
analogWrite(ledPins[7], pwmLevel);
}
}
but there is a big mix up between iterating through the LED pins, which you don't need to do, and iterating through the PWM levels, which you do need to do.
A suggestion. When in the LED7_IN_OUT state call a general purpose function that controls an LED number that you pass to it. That way you can use it for any LED. The function should check whether the period has ended and if so change the PWM level and write it to the LED. When the PWM level is at full brightness change the PWM increment and keep going. When the PWM level reaches the lowest brightness you are done with this LED so set up ready for the next state, perhaps saving the start time, and set currentState to the next state.