Skip to main content

A minimal implementation for taking temperature and humidity readings with the DHT20 sensor

Project description

dht20-sensor

Code for taking readings with the DHT20 temperature humidity sensor using I2C.

This is the most basic working implementation that suits my needs. It doesn't handle sensor initialisation.

Example Usage

import time

from dht20_sensor.sensor import DHT20Sensor

if __name__ == "__main__":
    sensor = DHT20Sensor()

    while True:
        t, h = sensor.read()
        print(t)
        print(h)
        time.sleep(2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dht20_sensor-0.0.1.tar.gz (38.8 kB view hashes)

Uploaded Source

Built Distribution

dht20_sensor-0.0.1-py3-none-any.whl (27.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page