#include <DHT.h>
#include <Servo.h>

#define DHTPIN 4
#define DHTTYPE DHT22
int SERVO = 3;

DHT dht(DHTPIN, DHTTYPE);
Servo servo;

int pos = 0;

void setup() {
  Serial.begin(38400); // Initialize the serial port
  dht.begin();
  servo.attach(SERVO);
  delay(2000);
}

void loop() {
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();

  // Check if any reads failed and exit early (to try again).
  if (isnan(h)) {
    Serial.println("Failed to read from DHT22 sensor!");
    return;
  }

  if (h <= 40) {
    Serial.print("Start Humidifier");
    Serial.print(" \t\t");

    Serial.print(h); 
    Serial.print(" %\t");

    servo.write(180);

    delay(6000);

    servo.write(0);

    Serial.print("Stop Humidifier");
    Serial.print(" \t");
  }

  // Wait a few seconds between measurements. The DHT22 should not be read at a higher frequency of
  // about once every 2 seconds. So we add a 3 second delay to cover this.
  delay(3000);
}
$abcdeabcde151015202530fghijfghij
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
dht1:VCC
dht1:SDA
dht1:NC
dht1:GND
servo1:GND
servo1:V+
servo1:PWM