#include <DHTesp.h>

const int DHT_Pin = 23;
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(1000);
}