Things used in this project

Hardware components:
A000066 iso both
Arduino UNO & Genuino UNO
×1
386 00
DHT11 Temperature & Humidity Sensor
×1
181 02
Adafruit Standard LCD - 16x2 White on Blue
×1
09590 01
LED (generic)
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×5
08377 02 l
Resistor 330 ohm
×1
Mfr 25frf52 1k sml
Resistor 1k ohm
×1
09939 01
Rotary potentiometer (generic)
×1
12002 04
Breadboard (generic)
×1
11026 02
Jumper wires (generic)
×1
Humidifier
×1
Hand tools and fabrication machines:
A4kb1xynkid5ebvjyil7
Digilent Screwdriver

Schematics

Circuit
20180121 201136573 ios 6vm7ddfyot

Code

Untitled fileArduino
#include "DHT.h"
#include "LiquidCrystal.h"

#define DHTPIN 10
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
{
  dht.begin();
  lcd.begin(16, 2);
  lcd.print("TEMP: ");
  lcd.setCursor(0, 1);
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
  pinMode(9, OUTPUT);
  pinMode(6, OUTPUT);
// init------------------------------------
}

void loop() {
  int a = 1;
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
//--------------------------------------------  
  if (h < 50){
  digitalWrite(9, HIGH);
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
  delay (250);
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
 // send pulse 2X-----------------------------
  while (a = 1){
  delay(1000);
  float c = dht.readTemperature(true);
  float h = dht.readHumidity(true);
  lcd.setCursor(6, 0);
  lcd.print((c - 35) * 0.5556);
  lcd.print((char)223);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("HUMI: ");
  lcd.setCursor(6, 1);
  lcd.print(h);
  lcd.print(" %");
  // LCD--------------------------------------
  if (h >= 55){
  digitalWrite(6, HIGH);
  delay (250);
  digitalWrite(6, LOW);
  digitalWrite(9, LOW);
  break;}
  }
  }
}

Credits

B874dcb5c27a55e9f8c31ee0b060ea8c
chenwei19940207
0 projects • 1 follower
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login