Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-mcp9808/badge/?version=latest
:target: https://docs.circuitpython.org/projects/mcp9808/en/latest/
:alt: Documentation Status
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MCP9808/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_MCP9808/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
The MCP9808 is an awesome, high accuracy temperature sensor that communicates
over I2C. Its available on `Adafruit as a breakout <https://www.adafruit.com/products/1782>`_.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Installing from PyPI
====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-mcp9808/>`_. To install for current user:
.. code-block:: shell
pip3 install adafruit-circuitpython-mcp9808
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install adafruit-circuitpython-mcp9808
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-mcp9808
Usage Notes
===========
Getting the temperature in Celsius is easy! First, import all of the pins from
the board, board.I2C() for native I2C communication and the thermometer library
itself.
.. code-block:: python3
import board
import adafruit_mcp9808
Next, initialize the I2C bus in a with statement so it always gets shut down ok.
Then, construct the thermometer class:
.. code-block:: python3
# Do one reading
with board.I2C() as i2c:
t = adafruit_mcp9808.MCP9808(i2c)
# Finally, read the temperature property and print it out
print(t.temperature)
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/mcp9808/en/latest/>`_.
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/adafruit/Adafruit_CircuitPython_MCP9808/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": "",
"name": "adafruit-circuitpython-mcp9808",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adafruit,temperature,sensor,mcp9808,breakout,hardware,micropython,circuitpython",
"author": "",
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/6f/27/8026bda3e9f752eba33374163357e893a1c58b158bfee3550dc21f876662/adafruit-circuitpython-mcp9808-3.3.21.tar.gz",
"platform": null,
"description": "\nIntroduction\n============\n\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-mcp9808/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/mcp9808/en/latest/\n :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MCP9808/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_MCP9808/actions/\n :alt: Build Status\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\nThe MCP9808 is an awesome, high accuracy temperature sensor that communicates\nover I2C. Its available on `Adafruit as a breakout <https://www.adafruit.com/products/1782>`_.\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\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nInstalling from PyPI\n====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-mcp9808/>`_. To install for current user:\n\n.. code-block:: shell\n\n pip3 install adafruit-circuitpython-mcp9808\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install adafruit-circuitpython-mcp9808\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 .venv/bin/activate\n pip3 install adafruit-circuitpython-mcp9808\n\nUsage Notes\n===========\n\nGetting the temperature in Celsius is easy! First, import all of the pins from\nthe board, board.I2C() for native I2C communication and the thermometer library\nitself.\n\n.. code-block:: python3\n\n import board\n import adafruit_mcp9808\n\nNext, initialize the I2C bus in a with statement so it always gets shut down ok.\nThen, construct the thermometer class:\n\n.. code-block:: python3\n\n # Do one reading\n with board.I2C() as i2c:\n t = adafruit_mcp9808.MCP9808(i2c)\n\n # Finally, read the temperature property and print it out\n print(t.temperature)\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/mcp9808/en/latest/>`_.\n\nFor 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>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_MCP9808/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CircuitPython library for MCP9808 high accuracy temperature sensor.",
"version": "3.3.21",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_MCP9808"
},
"split_keywords": [
"adafruit",
"temperature",
"sensor",
"mcp9808",
"breakout",
"hardware",
"micropython",
"circuitpython"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f223d533af79012bf9ce59e783c4cbede196283f0acad98df4e6c0a2ddf9225a",
"md5": "5c3474eb72ca6c00870c82fca99f45c3",
"sha256": "be6159c71839ecf18f132c2833fdab6ea65aec75fa7cebae9a54041fe31ed081"
},
"downloads": -1,
"filename": "adafruit_circuitpython_mcp9808-3.3.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c3474eb72ca6c00870c82fca99f45c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6263,
"upload_time": "2023-07-31T16:01:55",
"upload_time_iso_8601": "2023-07-31T16:01:55.664162Z",
"url": "https://files.pythonhosted.org/packages/f2/23/d533af79012bf9ce59e783c4cbede196283f0acad98df4e6c0a2ddf9225a/adafruit_circuitpython_mcp9808-3.3.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f278026bda3e9f752eba33374163357e893a1c58b158bfee3550dc21f876662",
"md5": "eeabd1dea7c4ca84cfb9adf1ecbbbd7f",
"sha256": "2700d23d504092f251860799bd4a60071c041f76a7bad78fc69032fc35d55a10"
},
"downloads": -1,
"filename": "adafruit-circuitpython-mcp9808-3.3.21.tar.gz",
"has_sig": false,
"md5_digest": "eeabd1dea7c4ca84cfb9adf1ecbbbd7f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28345,
"upload_time": "2023-07-31T16:01:56",
"upload_time_iso_8601": "2023-07-31T16:01:56.649890Z",
"url": "https://files.pythonhosted.org/packages/6f/27/8026bda3e9f752eba33374163357e893a1c58b158bfee3550dc21f876662/adafruit-circuitpython-mcp9808-3.3.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-31 16:01:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_MCP9808",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-register",
"specs": []
},
{
"name": "adafruit-circuitpython-busdevice",
"specs": []
},
{
"name": "typing-extensions",
"specs": [
[
"~=",
"4.0"
]
]
}
],
"lcname": "adafruit-circuitpython-mcp9808"
}