#include <DHT.h>
DHT dht(8, DHT22);
#define relay 9
void setup() {
Serial.begin(9600);
dht.begin();
pinMode(relay, OUTPUT);
digitalWrite(relay, LOW);
// put your setup code here, to run once:
}
void loop() {
float h = dht.readHumidity();
if(h>=55){
digitalWrite(relay, HIGH);
}else{
digitalWrite(relay, LOW);
}
// put your main code here, to run repeatedly:
}