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.15.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-hts221-1.1.15.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-hts221-1.1.15.tar.gz
Algorithm Hash digest
SHA256 b80275cb7136bc33d3cada0138ddcafc1ed1e7bac425603da4701c7cc8f5b516
MD5 3e8660f834ea30c844972025a183acbf
BLAKE2b-256 f89a95bea0d4ec9988e5f9542d77642210823d4c0ff2631c202c697248b92e36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_hts221-1.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 a5af3e2fc63dccf7665f44a6166fc5273c336364e86ceae9b8c98e039590d47f
MD5 fb4c7bcb35e54797ed9347b66013a2d1
BLAKE2b-256 363211e8929098404b57930d306d9eae288ed0f62b24e8e6e311fc876b6dd7c8

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