Skip to content

Commit 0643ebb

Browse files
committed
Lack of PulseIn detection now working
1 parent ef20e99 commit 0643ebb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_dht.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from digitalio import DigitalInOut, Pull, Direction
3434
_USE_PULSEIO = False
3535
try:
36-
import pulseio
36+
from pulseio import PulseIn
3737
_USE_PULSEIO = True
3838
except ImportError:
3939
pass # This is OK, we'll try to bitbang it!
@@ -63,7 +63,7 @@ def __init__(self, dht11, pin, trig_wait):
6363
# We don't use a context because linux-based systems are sluggish
6464
# and we're better off having a running process
6565
if _USE_PULSEIO:
66-
self.pulse_in = pulseio.PulseIn(self._pin, 81, True)
66+
self.pulse_in = PulseIn(self._pin, 81, True)
6767

6868
def _pulses_to_binary(self, pulses, start, stop):
6969
"""Takes pulses, a list of transition times, and converts

0 commit comments

Comments
 (0)