The DHT11 is an amazing sensor that allows you to measure temperature in Celsius or Fahrenheit degrees and humidity in % using Arduino.
In this tutorial, we will use the Arduino to print the temperature and humidity values on your computer using a suitable sensor called the DHT11.
Connect the wires between the DHT11 sensor and the Arduino. as shown in the image below.
Connections from the Arduino to the DHT11:
• Arduino GND pin → DHT11 GND pin (- pin)
• Arduino 5V pin → DHT11 VCC pin (+ pin)
• Arduino pin 3 → DHT11 out pin
Now access the serial monitor on your Arduino IDE by clicking on the magnifying glass icon at the top right corner.
Now as we see in the following image, the serial monitor displays temperature and humidity values. The value is updated and printed every second because of the delay we made in our code.