Skip to content

Commit 07da1cd

Browse files
Merge pull request adafruit#91 from chelmi/master
Fix for slower boards. Use uint16_t in expectPulse loop to increase sampling rate
2 parents b3b0b08 + b07db5a commit 07da1cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DHT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ bool DHT::read(bool force) {
243243
// in the very latest IDE versions):
244244
// https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/wiring_pulse.c
245245
uint32_t DHT::expectPulse(bool level) {
246-
uint32_t count = 0;
246+
uint16_t count = 0;
247247
// On AVR platforms use direct GPIO port access as it's much faster and better
248248
// for catching pulses that are 10's of microseconds in length:
249249
#ifdef __AVR

0 commit comments

Comments
 (0)