motor code error

As far as the Servo library is concerned, all pins support PWM.
Don't think about using analogWrite with a servo or ESC.