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

3 small changes #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dht_nonblocking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


/* Number of milliseconds before a new sensor read may be initiated. */
#define COOLDOWN_TIME 2000
#define COOLDOWN_TIME 10000


/*
Expand Down Expand Up @@ -80,8 +80,9 @@ float DHT_nonblocking::read_temperature( ) const
switch( _type )
{
case DHT_TYPE_11:
value = data[ 2 ];
to_return = (float) value;
to_return = data[2];
to_return += (data[3] & 0x0f) * 0.1;
if (data[3] & 0x80) to_return = -1. - to_return;
break;

case DHT_TYPE_21:
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sentence=Non-blocking DHT11, DHT21, and DHT22 sensor library
paragraph=Read temperature and humidity from the DHT11, DHT21, and DHT22 sensors without blocking other execution.
category=Sensors
url=https://github.com/olewolf/DHT_nonblocking
architectures=avr,esp8266
architectures=avr,esp8266,esp32