 String currentTempString = String(currentTemp); //String to store the sensor's temp so it can be exposed
 String currentHumidityString = String(currentHumidity); //String to store the sensor's humidity so it can be exposed
 
+//fan status: false=off, true=on
+bool fanStatus = false;
+
 //TESTING_HACK
 // this allows me to system test the project
 bool testing = false;

  }
}
void heatingExitFunction(){
 Particle.publish(APP_NAME, "heatingExitFunction", 60, PRIVATE);
 myDigitalWrite(fan, HIGH);
 myDigitalWrite(heat, LOW);
 myDigitalWrite(cold, LOW);
}

void endOfCycleEnterFunction(){
 Particle.publish(APP_NAME, "endOfCycleEnterFunction", 60, PRIVATE);
 myDigitalWrite(fan, HIGH);
 myDigitalWrite(heat, LOW);
 myDigitalWrite(cold, LOW);

 //start the timer of this cycle
 endOfCycleTimer = 0;

}
void endOfCycleUpdateFunction(){
 //time is up?
 if (endOfCycleTimer > END_OF_CYCLE_TIMEOUT) {
  thermostatStateMachine.transitionTo(idleState);
 }
}
void endOfCycleExitFunction(){
 Particle.publish(APP_NAME, "endOfCycleExitFunction", 60, PRIVATE);
}



  // int fan = D0;
  // int heat = D1;
  // int cold = D2;
  return coldTesting*4 + heatTesting*2 + fanOutput*1;
}

/*******************************************************************************
