Working PWM control w/ direction