#include <DHT.h>
#define DHT_PIN 13
#define DHT_TYPE DHT22
DHT dht(DHT_PIN, DHT_TYPE);
float temperature;
float humidity;
void setup() {
Serial.begin(115200);
dht.begin();
}
void loop() {
temperature = dht.readTemperature();
humidity = dht.readHumidity();
// temperature = (int)temperature; //Conver to whole number
Serial.print("Temperature : ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity : ");
Serial.print(humidity);
Serial.println(" %");
delay(500);
}