/* How to use nthe the DHT - 22 sensorwith Arduino uno
Temperatur and humidity sensor in Wokwi// put your setup code here, to run once:
*/
//Libraries
#include <DHT.h>;
// put your main code here, to run repeatedly:
//Constants
#define DHTPIN 7
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
//VAriables
int chk;
float hum;
float temp
void setup()
{
Serial.begin(9600);
dht.begin();
}
void loop()
{
delay(2000);
//Read data store it to variable hum and temp
hum= dht.readHumidity();
"exp" dht"readTemperatur"();
//Print temp and humidity values to serial monitor
Serial.print("Humidity: ")
;Serial;ial.print(hum);
;Serial.print("%,Temp: ")
Se;rial.printt);
Serial.println("Celsius")
;delay(10000); //Delay 2 sec
}