adafruit / adafruit/DHT-sensor-library

Humidity, temperature readings give exactly 0.00

Open
#200 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use
the forums at http://forums.adafruit.com to ask questions and troubleshoot why
something isn't working as expected. In many cases the problem is a common issue
that you will more quickly receive help from the forum community. GitHub issues
are meant for known defects in the code. If you don't know if there is a defect
in the code then start with troubleshooting on the forum first.

- **If following a tutorial or guide be sure you didn't miss a step.** Carefully
check all of the steps and commands to run have been followed. Consult the
forum if you're unsure or have questions about steps in a guide/tutorial.

- **For Arduino projects check these very common issues to ensure they don't apply**:

- For uploading sketches or communicating with the board make sure you're using
a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes
very hard to tell the difference between a data and charge cable! Try using the
cable with other devices or swapping to another cable to confirm it is not
the problem.

- **Be sure you are supplying adequate power to the board.** Check the specs of
your board and plug in an external power supply. In many cases just
plugging a board into your computer is not enough to power it and other
peripherals.

- **Double check all soldering joints and connections.** Flakey connections
cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints.

- **Ensure you are using an official Arduino or Adafruit board.** We can't
guarantee a clone board will have the same functionality and work as expected
with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

- Arduino board: **ESP32**

- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO
VERSION HERE**

- List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too): **LIST REPRO STEPS BELOW**

I hooked up an ESP32 with a DHT11 sensor. The 2nd pin on the DHT is connected to the board's D2 Pin.
Temperature/Humidity readings from the sensor are always "0.00".

* The numbers are non `nan` but exactly 0.00 unless I disconnect the sensor then it's `nan`.
* The library is able to read sensor driver version and sensor type (I tried from the unified sensor example)

What does it mean when it's constantly 0.00?
Are there any error codes or any way I can debug this issue?

The problem is described in more detail here.
https://arduino.stackexchange.com/questions/92394/esp32-failing-to-read-from-mh-z19c-sensor

Contributor guide

Open the contributing guide

Research direction

The issue names an ESP32, DHT11 sensor, D2 wiring, and a linked Arduino Stack Exchange report, but no source file or test. Start by reviewing the stated wiring and reproduction details, then determine whether the behavior is a library defect or a troubleshooting issue. Done requires a reproducible defect with enough information to identify the affected code.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.