Public Member Functions | Public Attributes | Private Member Functions
dht11.DHT11 Class Reference

List of all members.

Public Member Functions

def __init__
def __iter__
def close
def either_edge_callback
def next
def read
def register_callbacks
def setup

Public Attributes


Private Member Functions

def _edge_EITHER
def _edge_FALL
def _edge_RISE

Detailed Description

The DHT11 class is a stripped version of the DHT22 sensor code by joan2937.
You can find the initial implementation here:

example code:
>>> pi = pigpio.pi()
>>> sensor = DHT11(pi, 4) # 4 is the data GPIO pin connected to your sensor
>>> for response in sensor:
....    print("Temperature: {}".format(response['temperature']))
....    print("Humidity: {}".format(response['humidity']))

Definition at line 10 of file

Constructor & Destructor Documentation

def dht11.DHT11.__init__ (   self,
pi (pigpio): an instance of pigpio
gpio (int): gpio pin number

Definition at line 24 of file

Member Function Documentation

def dht11.DHT11.__iter__ (   self)
Support the iterator protocol.

Definition at line 137 of file

def dht11.DHT11._edge_EITHER (   self,
) [private]
Handle Either signal.

Definition at line 112 of file

def dht11.DHT11._edge_FALL (   self,
) [private]
Handle Fall signal.

Definition at line 100 of file

def dht11.DHT11._edge_RISE (   self,
) [private]
Handle Rise signal.

Definition at line 71 of file

def dht11.DHT11.close (   self)
Stop reading sensor, remove callbacks.

Definition at line 128 of file

def dht11.DHT11.either_edge_callback (   self,
Either Edge callbacks, called each time the gpio edge changes.
Accumulate the 40 data bits from the dht11 sensor.

Definition at line 57 of file

def (   self)
Call the read method and return temperature and humidity informations.

Definition at line 143 of file

def (   self)
Start reading over DHT11 sensor.

Definition at line 118 of file

Monitors RISING_EDGE changes using callback.

Definition at line 47 of file

def dht11.DHT11.setup (   self)
Clears the internal gpio pull-up/down resistor.
Kills any watchdogs.

Definition at line 38 of file

Member Data Documentation

Definition at line 27 of file

Definition at line 73 of file

Definition at line 27 of file

Definition at line 27 of file

Definition at line 27 of file

Definition at line 27 of file

Definition at line 27 of file

Definition at line 27 of file

The documentation for this class was generated from the following file:

Author(s): Mathias L├╝dtke
autogenerated on Thu Jun 6 2019 20:43:57