Weather Monitoring System using Arduino and DHT11 Humidity/Temperature Sensor
Weather Monitoring System using Arduino and DHT11 Humidity/Temperature Sensor
Components Required:
- Arduino Uno with USB 2.0 Cable
- Digital Humidity/Temperature (DHT11) sensor
- Jumper Wires
- Breadboard
Arduino Uno with USB 2.0 Cable:
Arduino is a user-friendly, open-source electronics platform comprising both hardware and software components. Its design is geared towards enabling individuals involved in creating interactive projects.
DHT11 Humidity/Temperature Sensor:
DHT11 measures Humidity and temperature with the help of internal circuit.Specifications:
- Humidity Range: 20-90% RH
- Humidity Accuracy: ±5% RH
- Temperature Range: 0-50 °C
- Temperature Accuracy: ±2% °C
- Operating Voltage: 3V to 5.5V
Jumper Wires:
A jumper wire is an electrical wire equipped with connectors or pins at each end. It is commonly employed to interconnect components without the need for soldering, providing a convenient method for establishing electrical connections between different parts of a circuit.Breadboard:
Connection Diagram:
Connect your components according to the provided diagram and link the USB cable from Arduino to your computer.Adding the DHT library:
When you click the 'Add .ZIP library', you will get a file window that
pops up. Select a Zip file you’d like to add.
Arduino Code:
#include "DHT.h"
#define DHTPIN 7 //
what pin we're connected to
#define DHTTYPE DHT11 //
define type of sensor DHT 11
DHT
dht (DHTPIN, DHTTYPE);
void setup()
{
Serial.begin(9600); //Serial monitor
communication baud rate
Serial.println("DHT11 test!");
dht.begin();
}
void loop()
{
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read
from DHT sensor!");
return;
}
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature:
");
Serial.print(t);
Serial.println(" *C ");
}Upload Code:
Connect Arduino board to computer using
USB cable and wait for few seconds then it will show you "Com
port".
Check your Com Port and Board Selection
before upload arduino code and upload.
Output:
Additional Projects:
Subscribe to:
Post Comments
(
Atom
)
Internet of Things
What is Internet of Things?
What is IoT? The Internet of Things (IoT) is the network of physical objects/things are embedded with software, sensors, and hardw...
No comments :
Post a Comment