Temp Sensor to Output motor voltage

is it because its analogWrite and its coming out the digital pwm? should it be digitalWrite?