#include <DHT.h> // bei "" sucht er überall nach
#define DHTPIN 26
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.print("DHT Test, ESP32!");
dht.begin(); //.begin IMMER in setup
}
void loop() {
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
float hif = dht.computeHeatIndex(f, h);
float hic = dht.computeHeatIndex(t, h, false);
Serial.printf("Luffeuchte: %f Temperatur: %f \n", hif, hic);
}