Sensor measuring real-time Temperature & Humidity
The materials used are Arduino UNO R3, DHT11 Temperature, and Humidity sensor, Jumper wires, Breadboard, Arduino USB 2.0 cable.
Process
Place the sensor on the breadboard.
Connect the sensor and Arduino UNO with the help of Jumper Wires.
There are three pins in the sensor, the S pin is for signal, the middle one is for voltage and the last one is for ground.
In order to run the code successfully, the DHT library needs to be added to Arduino software. Then, write the code and compile it to get the output.
About the sensor
This sensor will help to measure real-time temperature and humidity. This helps the supervisor to maintain the temperature and humidity of the storage facility.
Breadboard View
PCB(Printed Circuit Board) View
Schematic View
Prototype 1
Code
#include <dht.h>
#define dht_apin A0 // Analog Pin sensor is connected to
dht DHT;
void setup(){
Serial.begin(9600);
delay(500);//Delay to let system boot
Serial.println("DHT11 - Humidity & temperature Sensor\n\n");
delay(1000);//Wait before accessing Sensor
}//end "setup()"
void loop(){
//Start of Program
DHT.read11(dht_apin);
Serial.print("Current humidity = ");
Serial.print(DHT.humidity);
Serial.print("% ");
Serial.print("Current temperature = ");
Serial.print(DHT.temperature);
Serial.println("C ");
delay(5000);//Wait 5 seconds before accessing sensor again.
//Fastest should be once every two seconds.
}// end loop(