Servo Controlled by a Temperature Sensor

How is your 'fan' related to the servo? Is is a continuous-rotation 'servo' acting as a fan motor so angle 0 spins the fan one way and angle 180 spins the fan the other way? if so, you'd want something like:

  if (degreesF < 72)
    servo1.write(0);
  else
    servo1.write(180);

Through the magic of the 'trinary' operator (?:slight_smile: that can be shortened to:    servo1.write(degreesF < 72 ? 0 : 180);
The trinary operator picks between two expressions based on the truth value of the conditional expression before the '?'.