 
   // 4. Turn off thermistor.
   // -----------------------
-  digitalWrite(MOSFET_THERM_PIN, LOW);
+  digitalWrite(THERM_PIN, LOW);
   delay(500);
 
   // 5. Average 5 thermistor readings.

void setup()
{
  pinMode(SD_CS_PIN, OUTPUT);
  pinMode(MOSFET_THERM_PIN, OUTPUT);
  sim900.begin(&Serial);
}


      sim900.sendTextMsg(textMessage, PHONE_NUMBER);
      if (sim900.isTextMsgDelivered() == false)
      {
        sd.begin();
        sd.writeFile(ERROR_FILENAME, String(unixTime) + ": " + ERROR_SMS);
        sd.writeFile(UNSENT_FILENAME, textMessage);
      }
    }
    else
    {
      sd.begin();
      sd.writeFile(ERROR_FILENAME, String(unixTime) + ": " + ERROR_GSM);
      sd.writeFile(UNSENT_FILENAME, textMessage);
    }

    // Reset number of cached readings
