// Question:
// Does the ESP32-S3 work with the DHT22 ?
// Answer:
// Probably not.
//
// This project is with the "DHT sensor library for ESPx".
//
// Test1: https://wokwi.com/projects/475345517909932033
// Test2: https://wokwi.com/projects/475346162827297793 (this project)
// Test3: https://wokwi.com/projects/475346465292234753
//
// Only Test3 with the DHTNew library works.
#include <DHTesp.h>
int DHT_PIN = 7;
DHTesp dhtSensor;
void setup()
{
Serial.begin(115200);
dhtSensor.setup(DHT_PIN, DHTesp::DHT22);
}
void loop()
{
TempAndHumidity data = dhtSensor.getTempAndHumidity();
Serial.println("Temp: " + String(data.temperature, 2) + "°C");
Serial.println("Humidity: " + String(data.humidity, 1) + "%");
Serial.println("-----------------------------");
delay(2000);
}