mirror of
https://github.com/niesteszeck/idDHT11.git
synced 2025-03-15 04:27:29 +03:00
Adds more time to acquire data
Example code consistently times out while grabbing data. Increasing the delta range for data acquisition fixes this.
This commit is contained in:
parent
d5ec9e0185
commit
6bc0283703
@ -90,7 +90,7 @@ void idDHT11::isrCallback() {
|
|||||||
detachInterrupt(intNumber);
|
detachInterrupt(intNumber);
|
||||||
status = IDDHTLIB_ERROR_DELTA;
|
status = IDDHTLIB_ERROR_DELTA;
|
||||||
state = STOPPED;
|
state = STOPPED;
|
||||||
} else if(60<delta && delta<135) { //valid in timing
|
} else if(60<delta && delta<155) { //valid in timing
|
||||||
if(delta>90) //is a one
|
if(delta>90) //is a one
|
||||||
bits[idx] |= (1 << cnt);
|
bits[idx] |= (1 << cnt);
|
||||||
if (cnt == 0) { // whe have fullfilled the byte, go to next
|
if (cnt == 0) { // whe have fullfilled the byte, go to next
|
||||||
|
Loading…
x
Reference in New Issue
Block a user