How to connect Arduino with DHT11 Temperature & Humidity sensor

Tilted Brush Stroke

You will need following Components: 1. Arduino Uno 2. DHT11 Temperature and Humidity Sensor 3. Jumper Wires

Get all the components as per above list

Tilted Brush Stroke

Now let us connect the above components.

Tilted Brush Stroke

Please note the sensor pins and connect accordingly.




Tilted Brush Stroke

Connect as per above instructions.

1. Connect the VCC pin of the DHT11 to the 5V pin on the Arduino. 2. Connect the GND pin of the DHT11 to the GND pin on the Arduino. 3. Connect the data pin of the DHT11 to a digital pin on the Arduino (e.g., Pin 7).

#include <DHT.h>  // Define the type of sensor and its pin  #define DHTPIN 7  #define DHTTYPE DHT11 // Create a DHT object  DHT dht(DHTPIN, DHTTYPE);   void setup() {    // Start the serial communication   Serial.begin(9600);    // Initialize the DHT sensor   dht.begin(); }

Tilted Brush Stroke

Time for Arduino sketch. Get it from our website.

Important Note: – Make sure to adjust the wiring and pin configurations based on your specific setup. – Install the DHT sensor library by Adafruit in the Arduino Library Manager if you haven't already. This code reads the temperature and humidity values from the DHT11 sensor and prints them to the Serial Monitor.  Adjust the delay and modify the code according to your specific requirements. Connect your Arduino Uno to your computer, upload the sketch, and open the Serial Monitor in the Arduino IDE to see the temperature and humidity readings.

Tilted Brush Stroke

See it in action.

Tilted Brush Stroke

Want any help ?

Thanks for watching

Contact us at

Want to connect stepper motor ?