adafruit-circuitpython-tca9548a


Nameadafruit-circuitpython-tca9548a JSON
Version 0.7.3 PyPI version JSON
download
home_page
SummaryCircuitPython driver for the TCA9548A I2C Multiplexer.
upload_time2023-12-09 17:35:25
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit tca9548a i2c multiplexer hardware micropython circuitpython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-tca9548a/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/tca9548a/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_TCA9548A/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/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


CircuitPython driver for the TCA9548A I2C Multiplexer.

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-tca9548a/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-tca9548a

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-tca9548a

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-tca9548a

Usage Example
=============

.. code-block :: python

    # This example shows using TCA9548A to perform a simple scan for connected devices
    import board
    import adafruit_tca9548a

    # Create I2C bus as normal
    i2c = board.I2C()  # uses board.SCL and board.SDA

    # Create the TCA9548A object and give it the I2C bus
    tca = adafruit_tca9548a.TCA9548A(i2c)

    for channel in range(8):
        if tca[channel].try_lock():
            print("Channel {}:".format(channel), end="")
            addresses = tca[channel].scan()
            print([hex(address) for address in addresses if address != 0x70])
            tca[channel].unlock()


Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/tca9548a/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_TCA9548A/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-tca9548a",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,tca9548a,i2c,multiplexer,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/91/e2/b49021c1904223e8f01a57ac80998db76efdde1e7a50f3726be972b5ac39/adafruit-circuitpython-tca9548a-0.7.3.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-tca9548a/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/tca9548a/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_TCA9548A/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/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\n\nCircuitPython driver for the TCA9548A I2C Multiplexer.\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-tca9548a/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-tca9548a\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-tca9548a\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-tca9548a\n\nUsage Example\n=============\n\n.. code-block :: python\n\n    # This example shows using TCA9548A to perform a simple scan for connected devices\n    import board\n    import adafruit_tca9548a\n\n    # Create I2C bus as normal\n    i2c = board.I2C()  # uses board.SCL and board.SDA\n\n    # Create the TCA9548A object and give it the I2C bus\n    tca = adafruit_tca9548a.TCA9548A(i2c)\n\n    for channel in range(8):\n        if tca[channel].try_lock():\n            print(\"Channel {}:\".format(channel), end=\"\")\n            addresses = tca[channel].scan()\n            print([hex(address) for address in addresses if address != 0x70])\n            tca[channel].unlock()\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/tca9548a/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_TCA9548A/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython driver for the TCA9548A I2C Multiplexer.",
    "version": "0.7.3",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A"
    },
    "split_keywords": [
        "adafruit",
        "tca9548a",
        "i2c",
        "multiplexer",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75e1fab5a268d592efa8449f6fe7eb58d17df755f8ba33ae7a3bb7c9360ce1e6",
                "md5": "1f1cb0964d5a7427b3bfc33dbecb9dcf",
                "sha256": "9d22ba5a3e04f5836f31713face038766ce3f1e661e099c55ba790b5b697747c"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_tca9548a-0.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f1cb0964d5a7427b3bfc33dbecb9dcf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5050,
            "upload_time": "2023-12-09T17:35:24",
            "upload_time_iso_8601": "2023-12-09T17:35:24.960966Z",
            "url": "https://files.pythonhosted.org/packages/75/e1/fab5a268d592efa8449f6fe7eb58d17df755f8ba33ae7a3bb7c9360ce1e6/adafruit_circuitpython_tca9548a-0.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "91e2b49021c1904223e8f01a57ac80998db76efdde1e7a50f3726be972b5ac39",
                "md5": "1c55b7c3540be500adc32510428da7d8",
                "sha256": "2ca0afe449321af7546589f7ec64bdefb0b347a70652532a37bb67a3a071db88"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-tca9548a-0.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1c55b7c3540be500adc32510428da7d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26602,
            "upload_time": "2023-12-09T17:35:25",
            "upload_time_iso_8601": "2023-12-09T17:35:25.989393Z",
            "url": "https://files.pythonhosted.org/packages/91/e2/b49021c1904223e8f01a57ac80998db76efdde1e7a50f3726be972b5ac39/adafruit-circuitpython-tca9548a-0.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:35:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_TCA9548A",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-tca9548a"
}
        
Elapsed time: 0.21969s