Fix for ntx2

It seems that using digitalWrite is bad for the pwm, switching to analog
has reduced the gap between the frequency switch.