HDC1080
============
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/sensebox/CircuitPython_HDC1080/workflows/Build%20CI/badge.svg
:target: https://github.com/sensebox/CircuitPython_HDC1080/actions
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
Libray for the HDC1080 temperature and humidity sensor.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.
Installing from PyPI
=====================
.. note:: This library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/circuitpython-hdc1080/>`_.
To install for current user:
.. code-block:: shell
pip3 install circuitpython-hdc1080
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install circuitpython-hdc1080
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install circuitpython-hdc1080
Installing to a Connected CircuitPython Device with Circup
==========================================================
Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:
.. code-block:: shell
pip3 install circup
With ``circup`` installed and your CircuitPython device connected use the
following command to install:
.. code-block:: shell
circup install hdc1080
Or the following command to update an existing version:
.. code-block:: shell
circup update
Usage Example
=============
.. code-block:: python
import time
import board
import digitalio
from hdc1080 import HDC1080
# IO Enable Pin (only needed for senseBox MCU-S2)
io_enable_pin = digitalio.DigitalInOut(board.IO_POWER)
io_enable_pin.direction = digitalio.Direction.OUTPUT
io_enable_pin.value = False
# Initialize I2C bus
i2c = board.I2C()
# Initialize HDC1080 sensor
sensor = HDC1080(i2c)
while True:
temperature = sensor.temperature
humidity = sensor.humidity
print("Temperature: {:.2f} °C".format(temperature))
print("Humidity: {:.2f} %".format(humidity))
time.sleep(2) # Wait for 2 seconds before next reading
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://circuitpython-hdc1080.readthedocs.io/>`_.
For information on building library documentation, please check out
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/sensebox/CircuitPython_HDC1080/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": null,
"name": "circuitpython-hdc1080",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, blinka, circuitpython, micropython, hdc1080",
"author": "sensebox",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c7/8b/0415c1e3c9ddde855093058851c2ccd018212ebee116c23f9b997d14a479/circuitpython_hdc1080-1.0.0.tar.gz",
"platform": null,
"description": "HDC1080\n============\n\n\n\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n\n.. image:: https://github.com/sensebox/CircuitPython_HDC1080/workflows/Build%20CI/badge.svg\n :target: https://github.com/sensebox/CircuitPython_HDC1080/actions\n :alt: Build Status\n\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\n\nLibray for the HDC1080 temperature and humidity sensor.\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\n* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\n\nInstalling from PyPI\n=====================\n.. note:: This library is not available on PyPI yet. Install documentation is included\n as a standard element. Stay tuned for PyPI availability!\n\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/circuitpython-hdc1080/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n pip3 install circuitpython-hdc1080\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install circuitpython-hdc1080\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n mkdir project-name && cd project-name\n python3 -m venv .venv\n source .env/bin/activate\n pip3 install circuitpython-hdc1080\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n circup install hdc1080\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n import time\n import board\n import digitalio\n from hdc1080 import HDC1080\n\n # IO Enable Pin (only needed for senseBox MCU-S2)\n io_enable_pin = digitalio.DigitalInOut(board.IO_POWER)\n io_enable_pin.direction = digitalio.Direction.OUTPUT\n io_enable_pin.value = False\n\n # Initialize I2C bus\n i2c = board.I2C()\n\n # Initialize HDC1080 sensor\n sensor = HDC1080(i2c)\n\n while True:\n temperature = sensor.temperature\n humidity = sensor.humidity\n\n print(\"Temperature: {:.2f} \u00b0C\".format(temperature))\n print(\"Humidity: {:.2f} %\".format(humidity))\n\n time.sleep(2) # Wait for 2 seconds before next reading\n\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs <https://circuitpython-hdc1080.readthedocs.io/>`_.\n\nFor information on building library documentation, please check out\n`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/sensebox/CircuitPython_HDC1080/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/sensebox/CircuitPython_HDC1080"
},
"split_keywords": [
"adafruit",
" blinka",
" circuitpython",
" micropython",
" hdc1080"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9071514aff96e2bb29daf4eecdb83b2ccec53b4c148b8821b9396048fc16b296",
"md5": "467f838d365b4e3756faab8031f22ad3",
"sha256": "a53fe3633452a07de7945d3f4f098196557895de58ba591da99921cebf29c3b1"
},
"downloads": -1,
"filename": "circuitpython_hdc1080-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "467f838d365b4e3756faab8031f22ad3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5344,
"upload_time": "2025-01-29T09:58:15",
"upload_time_iso_8601": "2025-01-29T09:58:15.984396Z",
"url": "https://files.pythonhosted.org/packages/90/71/514aff96e2bb29daf4eecdb83b2ccec53b4c148b8821b9396048fc16b296/circuitpython_hdc1080-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c78b0415c1e3c9ddde855093058851c2ccd018212ebee116c23f9b997d14a479",
"md5": "4e5a71b5f554252d13617ef3e49726c3",
"sha256": "a5ff8ee894567cfd85e4ccef95b08a7bf8737da4df9e22959eac1caeed7ae90e"
},
"downloads": -1,
"filename": "circuitpython_hdc1080-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4e5a71b5f554252d13617ef3e49726c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27684,
"upload_time": "2025-01-29T09:58:17",
"upload_time_iso_8601": "2025-01-29T09:58:17.314551Z",
"url": "https://files.pythonhosted.org/packages/c7/8b/0415c1e3c9ddde855093058851c2ccd018212ebee116c23f9b997d14a479/circuitpython_hdc1080-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 09:58:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sensebox",
"github_project": "CircuitPython_HDC1080",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-busdevice",
"specs": []
},
{
"name": "adafruit-circuitpython-register",
"specs": []
}
],
"lcname": "circuitpython-hdc1080"
}