Combining led blink and fade (PWM)

I haven't tried the code yet cause it says 'NUM_STATE' was not declared in this scope,

That's because there is not a variable named NUM_STATE in your code.

There is, however, one named NUM_STATES