#include "DHT.h"
const int dhtPin = 15;
DHT dht(dhtPin, DHT22);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
dht.begin();
}
void loop() {
// put your main code here, to run repeatedly:
float h = dht.readHumidity();
float t = dht.readTemperature(); // Read temperature as Celsius
float f = dht.readTemperature(true); // Read temerature as Fahrenheit
Serial.print("Humidity: ");
Serial.println(h);
Serial.print("Temperature (C): ");
Serial.println(t);
Serial.print("Temperature (F): ");
Serial.println(f);
delay(1000);
}