Following Components/Equipment are
required to perform task.
1.
Arduino
Uno (https://piees.pk/product/arduino-uno-r3/)
2.
DHT11
humidity and temperature sensor (https://piees.pk/product/dht11-humidity-sensor/)
3.
Breadboard
4.
Jumper
Wires(https://piees.pk/product-category/jumper-wires/)
Circuit
Diagram:
#include<dht.h>
dht
DHT;
#define
DHT11_PIN 3
void
setup() {
Serial.begin(9600);
Serial.println("DHT11
Interfacing with Arduino Uno"); }
void
loop()
{
// READ DATA
int
chk = DHT.read11(DHT11_PIN);
if
(digitalRead(0)>35)
{
digitalWrite(A3,
HIGH);
delay(75000);
digitalWrite(A3,
LOW);
}
Serial.print("Humidity
");
Serial.print(DHT.humidity,
1);
Serial.print(" Temparature ");
Serial.println(DHT.temperature,
1);
delay(2000);
}
Note:
No comments:
Post a Comment