Combining led blink and fade (PWM)

Danois90:
Is any of the fading working as you want it to?

Still playing with the state machine you gave me,
some questions here:

Can each state triggered by time? I mean how to trigger by millis() , like after 5 seconds state 1 finish then run state 2 ?

And what if one of state need different time for fade in, what should I do with it ?

Sorry beginner of PWM, millis() and state machine, don't know how to combine these codes cause I'm unfamiliar with these codes,

please help :frowning: Thank you!