#include <DHT.h>
#define DHTPIN 14 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor
float humidity; //Stores humidity value
float temperature_c; // Stores Celcius temperature value
float temperature_f; // Store Fahrenheit temperature value
float hic; // Stores heat index for Celcius temperature value
float hif; // Stores heat index for Fahrenheit value
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
dht.begin();
}
void loop() {
// put your main code here, to run repeatedly:
//Print temp and humidity values to serial monitor
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print(" %, Temperature C: ");
Serial.print(temperature_c);
Serial.print(" Celsius");
Serial.print(", Heat Index C: ");
Serial.print(hic);
Serial.print(", Temperature F: ");
Serial.print(temperature_f);
Serial.print(" Fahrenheit");
Serial.print(", Heat Index F: ");
Serial.println(hif);
delay(10000);
}