Skip to main content

Helper library for the HTS221 Humidity and Temperature Sensor

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

Helper library for the HTS221 Humidity and Temperature Sensor

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-hts221

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-hts221

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-hts221

Usage Example

import time
import board
import adafruit_hts221

i2c = board.I2C()
hts = adafruit_hts221.HTS221(i2c)
while True:
    print("Relative Humidity: %.2f percent rH" % hts.relative_humidity)
    print("Temperature: %.2f C" % hts.temperature)
    time.sleep(1)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

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

adafruit_circuitpython_hts221-1.1.18.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit_circuitpython_hts221-1.1.18.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_hts221-1.1.18.tar.gz
Algorithm Hash digest
SHA256 7b95a123e21507b1e3bb99aafe150f3493b478cb3019c7a0ba8589aa544b1ce4
MD5 b189d0b85801b234d030011942a813cf
BLAKE2b-256 12601f05054f4e5e25b44c489117b83782608b3b574387ddb74eacc03471e1f4

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_hts221-1.1.18-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_hts221-1.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 0a89d660674638d97f32e0c8fd650655fbeb230b61c31ac0d392ff99dd780256
MD5 3de710c33b5982e4fd194802d1736542
BLAKE2b-256 d489b5fca0753f5b45c6b6ad6f1af031df2b1fc64008be482984bc1c41f7a027

See more details on using hashes here.

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