   
   delay(sampleRate);
 }
+
+long readVcc() {
+  long result;
+  // Read 1.1V reference against AVcc
+  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
+  delay(2); // Wait for Vref to settle
+  ADCSRA |= _BV(ADSC); // Convert
+  while (bit_is_set(ADCSRA,ADSC));
+  result = ADCL;
+  result |= ADCH<<8;
+  result = 1126400L / result; // Back-calculate AVcc in mV
+  return result;
+}


int sampleRate = 2500; //Milliseconds between sampling

#define DHTPWR 7
#define DHTGND 4
#define DHTPIN 6     // what pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // MDHT 11 

void setup() {
  pinMode(DHTPWR, OUTPUT);
  pinMode(DHTGND, OUTPUT);
  pinMode(LM34PWR, OUTPUT);
  pinMode(LM34GND, OUTPUT);
  pinMode(LM34PIN, INPUT);
  
  Serial.begin(9600); 
  
  Serial.println("TemperatureMonitor");
  Serial.println("v0.2 Eric Menze 1.25.2014");
  Serial.println("Powering Sensors...");
  digitalWrite(DHTPWR, HIGH);
  digitalWrite(DHTGND, LOW);
  digitalWrite(LM34PWR, HIGH);
  digitalWrite(LM34GND, LOW);
  delay(2000);
  dht.begin();
  Serial.println("Beginning Read Loop...");
