assignment-no-11
assignment-no-11
A4
Hardware Requirement:
Arduino board –
Breadboard.
Some male-female wires.
DHT 11 temperature sensor
Arduino, USB cable etc.
● Theory:
Pinout of DHT11 Sensor
The DHT11 typically comes with a 4-pin package, although only three of them are
functionally used:
1. VCC (Pin 1): This is the power supply pin, which can accept voltages from 3.3V to
5V, making it compatible with most microcontroller systems.
2. Data (Pin 2): This is the pin through which the DHT11 communicates. It uses a
proprietary single-wire protocol to transmit temperature and humidity data to the
connected microcontroller.
3. NC (Pin 3): Not connected or used.
4. GND (Pin 4): Ground pin, used to complete the circuit.
Connect the VCC & GND Pin of DHT11 Sensor Module to 3.3V & GND pin of Arduino
respectively. Similarly connect the DHT11 Data pin to Arduino Digital Pin 2.
For finding out the minimum and maximum temperature we need to compare the temperature
measured in every turn with the previously measured temperature . for comparison If loop is
used
e. g
if (f > tfmax)
{
tfmax = f;
}
if (f < tfmin)
{
tfmin = f;
}
Procedure :
3. When the code is uploaded, open the Serial Monitor and set the baud rate to 9600.
Conclusion