Skip to content

Conversation

jerryneedell
Copy link

modified driver to correctly handle sign bit for the DHT22.

tested in freezer - dht_simpletest converts to F so the transition was failing at 32 F. see issue #9

 Temp: 33.8 F Humidity: 18.6% 
Temp: 33.6 F Humidity: 18.8% 
Temp: 33.3 F Humidity: 18.9% 
Temp: 33.1 F Humidity: 19.0% 
Temp: 32.9 F Humidity: 19.2% 
Temp: 32.5 F Humidity: 19.3% 
Temp: 32.4 F Humidity: 19.4% 
Temp: 32.0 F Humidity: 19.5% 
Temp: 31.8 F Humidity: 19.7% 
Temp: 31.6 F Humidity: 19.8% 
Temp: 31.5 F Humidity: 20.0% 

Note - tested DHT11 in the freezer, but it never reported any value < 1 C - according to the data sheet, its range is 0- 50 C so there is no need for a sign bit.

@jerryneedell jerryneedell requested a review from mrmcwethy April 28, 2018 21:17
Copy link
Collaborator

@mrmcwethy mrmcwethy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like what you did. I should have found this, but did not try the freezer test.

@dhalbert dhalbert merged commit a384b7d into adafruit:master Apr 29, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 30, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_DHT to 3.1.0 from 3.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_DHT#10 from jerryneedell/jerryn_negative
  > Merge pull request adafruit/Adafruit_CircuitPython_DHT#8 from jerryneedell/jerryn_dht
  > Merge pull request adafruit/Adafruit_CircuitPython_DHT#6 from sommersoft/new_docs
  > Merge pull request adafruit/Adafruit_CircuitPython_DHT#5 from sommersoft/new_docs
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.

3 participants