Skip to main content

Driver for the Si7021 humidity and temperature sensor

Project description

Driver for the Si7021 humidity and temperature sensor.

Usage:

Dependencies

Installation

1. pip install from PyPi

pip install Si7021

2. pip install from git

pip install git+https://github.com/herm/Si7021

3. Clone the repository and run setup.py

git clone https://github.com/herm/Si7021
python setup.py install

Usage

If you have a sensor connected to I2C bus 1, you may run

>>> from si7021 import Si7021
>>> from time import sleep
>>> from smbus import SMBus
>>> sensor = Si7021(SMBus(1))
>>> print("%.1f %%RH, %.1f °C" % sensor.read())
>>> sensor.heater_mA = 50
>>> sleep(10)
>>> print("%.1f %%RH, %.1f °C" % sensor.read())
>>> sensor.heater_mA = 0

Bug Reporting

To submit a bugreport use the GitHub bugtracker for the project:

https://github.com/herm/Si7021/issues

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

Si7021-0.1.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

Si7021-0.1.1-py2.py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 2 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