:orphan: .. _device-DHTxx: DHTxx ===== **From:** Raspberry Pi Compatible Components **Class:** :py:class:`herosdevices.hardware.raspberrypi.dhtxx.DHTxx` **Driver Quality Index:** alpha .. admonition:: Requires the following packages `Adafruit-Blinka `_, `Adafruit-DHT `_ Class to support reading temperatures and humidities from the DHT11 and DHT22 onewire sensors. This class builds on the "Adafruit_DHT" python package. .. tab-set:: .. tab-item:: Arguments Bold arguments are mandatory. For more information on the listed arguments refer to the class documentation: :py:class:`herosdevices.hardware.raspberrypi.dhtxx.DHTxx` If parameters appear in this list but not in the class definition, please recursively check the linked base classes for the definition of the parameter. .. list-table:: :widths: 50 50 50 100 :header-rows: 1 * - Argument - Type - Default Value - Description * - device - typing.Literal[11, 22] - 22 - type of the device. Must be either 11 for a DHT11 or 22 for a DHT22. * - pin_name - int | str - 4 - number of the pin, the sensor is connected to. .. tab-item:: Example JSON for BOSS The following JSON strings can be used to start a HERO device representation of :py:class:`DHTxx ` using `BOSS `_. .. code-block:: json { "_id": "my_DHTxx", "classname": "herosdevices.hardware.raspberrypi.dhtxx.DHTxx", "arguments": { "device": 22, "pin_name": 4 } } :sup:`generated from signature` .. tab-item:: Inheritance .. inheritance-diagram:: herosdevices.hardware.raspberrypi.dhtxx.DHTxx