#include "DHT.h"
#define DHTPIN 4
#define DHTTYPE DHT22 // en fisico DHT11
DHT dht(DHTPIN, DHTTYPE); // DHT dht(4, DHT22)
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop(){
delay(2000); // 2000ms
//necesitamos dos variables
float h = dht.readHumidity();
float t = dht.readTemperature();
float st = dht.computeHeatIndex(t,h,false);
Serial.print(F("Humedad: "));
Serial.print(h);
Serial.print(F("% Temperatura: "));
Serial.print(t);
Serial.print(F("Sensacion Termica: "));
Serial.print(st);
}