Analog write for motors