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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for adafruit-circuitpython-hts221-1.1.11.tar.gz
Algorithm Hash digest
SHA256 d221d39b08d9c65a9b78703c24567fc6d8cb42f9c481ec3fdde40f89ae745212
MD5 5e0e64a808fca1ab5c840ab5d3904839
BLAKE2b-256 54c06711e96892447823cad5aa85ed666e7b8fe67dd6de0377943c142c339974

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_hts221-1.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 8f7d3cc860211ac9aec88c5fd088bc7a92bf4007e7a6cd38e2b57833b49ed559
MD5 b244741f92cf5b6e665d02c4cd306df9
BLAKE2b-256 a1d1aac3496684d4ea0f1014034825b0b87428147465f459fada3ea270954089

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