Skip to content

Commit

Permalink
Merge pull request #25 from makermelissa/master
Browse files Browse the repository at this point in the history
Lack of PulseIn detection now working
  • Loading branch information
ladyada authored Sep 11, 2019
2 parents ef20e99 + 0643ebb commit 558e53e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_dht.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from digitalio import DigitalInOut, Pull, Direction
_USE_PULSEIO = False
try:
import pulseio
from pulseio import PulseIn
_USE_PULSEIO = True
except ImportError:
pass # This is OK, we'll try to bitbang it!
Expand Down Expand Up @@ -63,7 +63,7 @@ def __init__(self, dht11, pin, trig_wait):
# We don't use a context because linux-based systems are sluggish
# and we're better off having a running process
if _USE_PULSEIO:
self.pulse_in = pulseio.PulseIn(self._pin, 81, True)
self.pulse_in = PulseIn(self._pin, 81, True)

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

0 comments on commit 558e53e

Please sign in to comment.