 void loop()                     // run over and over again
 {
   long H=evalHumid(HumReadingsPer, HumSensorPin);
+  long TempValue = Temperature(TempSensorPin,Vishay_10K_Therm,TempBalanceR);
   Serial.println("_____");
+  Serial.println("Temperature");
+  Serial.println(TempValue);
+  Serial.println("Humidity");
   Serial.println(H);
   Serial.println("_____");
   delay(100);

// Arduino Climate Monitor Node
// 30Aug2014
// Adam Green (ndsoccer11122@yahoo.com)

// HCH-1000 Humidity Sensor
// 10Mohm R1
// 220ohm R2

int HumSensorPin = 4;

long HumResult = 0;
unsigned long HumTime1=0;
unsigned long HumTime2=0;

long HumReadingsPer=30.0;
long HumReadDelay=200.0;

void setup()                    // run once, when the sketch starts
{

    //result++;
  }
  decayTime(2);
  delay(HumReadDelay); 
  //return result;                   // report results   
}

long decayTime(int input){
  if (input==1){
    HumTime1=micros();
  }
  if (input==2 ){
    HumTime2=micros(); 
  }
  if (input==3){
    return (HumTime2-HumTime1);
  }
}

float Temperature(int AnalogInputNumber,float B,float T0,float R0,float R_Balance)
{
  float R,T;
  R=R_Balance*(1024.0f/float(analogRead(AnalogInputNumber))-1);
  T=1.0f/(1.0f/T0+(1.0f/B)*log(R/R0));
  T=9.0f*(T-273.15f)/5.0f+32.0f;
  return T;
}
