Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: wrong values at negative temperatures an ESP8266 and DHT22 #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

argltuc
Copy link

@argltuc argltuc commented Feb 1, 2021

Problem is described in #177

Solution:
shift incomming data on int16_t variable before cast to float.

I could test this solution only on Arduino IDE 1.8.13 with ESP8266 / DHT 22.
Maybe testing on other controllers / dht types could be necessery

@ahmadSum1
Copy link

Tested on esp32 Devkitv1. with an aliexpress DHT22 (the product page says AM2302 but no branding on the sensor)
Works!!!
Thanks, I was about to place a refund claim on a working sensor!

@bouttier
Copy link

I have the same issue. However, I suggest to look at this PR before merging this one: arendst/Tasmota#14173
TL;DR: There are two kind of sensor with different negative number encoding. The linked PR support both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants