Paul Whorter tutorial 50

Hi. I'm doing just a project at home which is meant to be simple. I had this problem for a while. I was doing a simple DHT11 circuit. 3 wires only. The right hand side of DHT11 connected to GND (Black wire).Middle pin of DHT11 connected to 5V. Left pin (green wire) connected to pin 2. All is via breadboard. Here is the link of the video I followed:

https://www.youtube.com/watch?v=-AvF2TsB2GI&t=772s

Here is the code:

include "DHT.h"

define Type DHT11

int sensePin=2; DHT HT (sensePin,Type); float humidity; float tempC; float tempF; int setTime=500; int dt=1000;

void setup() { // put your setup code here, to run once: Serial.begin(9600); HT.begin(); delay(setTime);

}

void loop() { // put your main code here, to run repeatedly: humidity=HT.readHumidity(); tempC=HT.readTemperature(); tempF=HT.readTemperature(true);

Serial.print("Humidity: "); Serial.print(humidity); Serial.print(" Temperature C "); Serial.print(tempC); Serial.print(" C "); Serial.print(tempF); Serial.println(" F "); delay(dt);

}

Anyways for some reason I'm getting nothing from the DHT11. I was doing projects that were complicated and found out even if I do the most simplest of circuits, I still don't get any readings on the serial monitor.My main purpose is to use a DHT11. I also have attached below how I connected my Arduino and trust me everything is correct. I've done things which were far more complicated looking at it but haven't ever used a DHT11. I also attached what I have been getting on the serial port.

Thank you for your help and consideration :) .Most of my attachments just had to add it in my post sorry. It said files weren't appropriate even though they're word with a screen shot. Any info you need just let me know.

MrAbdi:
Hi. I’m doing just a project at home which is meant to be simple. I had this problem for a while. I was doing a simple DHT11 circuit. 3 wires only. The right hand side of DHT11 connected to GND (Black wire).Middle pin of DHT11 connected to 5V. Left pin (green wire) connected to pin 2. All is via breadboard.
Here is the link of the video I followed:

Arduino Tutorial 50: How to Connect and Use the DHT11 Temperature and Humidity Sensor - YouTube

Here is the code:

#include “DHT.h”
#define Type DHT11
int sensePin=2;
DHT HT (sensePin,Type);
float humidity;
float tempC;
float tempF;
int setTime=500;
int dt=1000;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(setTime);

}

void loop() {
// put your main code here, to run repeatedly:
humidity=HT.readHumidity();
tempC=HT.readTemperature();
tempF=HT.readTemperature(true);

Serial.print("Humidity: “);
Serial.print(humidity);
Serial.print(” Temperature C “);
Serial.print(tempC);
Serial.print(” C “);
Serial.print(tempF);
Serial.println(” F ");
delay(dt);

}

Anyways for some reason I’m getting nothing from the DHT11. I was doing projects that were complicated and found out even if I do the most simplest of circuits, I still don’t get any readings on the serial monitor.My main purpose is to use a DHT11. I also have attached below how I connected my Arduino and trust me everything is correct. I’ve done things which were far more complicated looking at it but haven’t ever used a DHT11. I also attached what I have been getting on the serial port.

Thank you for your help and consideration :slight_smile: .Most of my attachments just had to add it in my post sorry. It said files weren’t appropriate even though they’re word with a screen shot. Any info you need just let me know.

Also bought a bunch of DHT11s and still nothing worked.Sorry forgot to add that.

There are a LOT of "DHT" libraries. Do you have the one named "DHT sensor library" from Adafruit? Some comments on the video say you also need the "Adafruit Unified Sensor" library. Use the Library Manager (Tools->Manage Libraries...) to install/update both of those.