Help adding 3rd state

Looks as though just you need to add another else if in determine_state and call set_state with a different array with the pwm values in it.