Skip to content

Lack of PulseIn detection now working #25

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

Merged
merged 1 commit into from
Sep 11, 2019
Merged
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
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