adafruit-circuitpython-ds2413


Nameadafruit-circuitpython-ds2413 JSON
Version 1.2.16 PyPI version JSON
download
home_page
SummaryCircuitPython library for DS2413 1-Wire Dual Channel Addressable Switch.
upload_time2023-09-25 15:39:28
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit haptic motor controller buzzer vibration breakout 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-ds2413/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/ds2413/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_DS2413/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_DS2413/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 DS2413 one wire 2 channel GPIO breakout.

Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Adafruit OneWire <https://github.com/adafruit/Adafruit_CircuitPython_OneWire>`_

**Note:** This library depends on the OneWire library and will **not** work on the Raspberry Pi

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

.. code-block:: shell

    pip3 install adafruit-circuitpython-ds2413

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

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-ds2413

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

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

.. code-block:: python

    import time
    import board
    from adafruit_onewire.bus import OneWireBus
    import adafruit_ds2413

    ow_bus = OneWireBus(board.D2)
    ds = adafruit_ds2413.DS2413(ow_bus, ow_bus.scan()[0])

    led = ds.IOA
    button = ds.IOB
    button.direction = adafruit_ds2413.INPUT

    while not button.value:
        led.value = True
        time.sleep(0.5)
        led.value = False
        time.sleep(0.5)


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

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-ds2413",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,haptic,motor,controller,buzzer,vibration,breakout,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/8e/73/78d469586b834aee11e0501faced1e7f3e4135c9cb40b5428c1dcdd41913/adafruit-circuitpython-ds2413-1.2.16.tar.gz",
    "platform": null,
    "description": "\nIntroduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ds2413/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/ds2413/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_DS2413/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_DS2413/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\nCircuitPython driver for the DS2413 one wire 2 channel GPIO breakout.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Adafruit OneWire <https://github.com/adafruit/Adafruit_CircuitPython_OneWire>`_\n\n**Note:** This library depends on the OneWire library and will **not** work on the Raspberry Pi\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-ds2413/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-ds2413\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-ds2413\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-ds2413\n\nUsage Example\n=============\n\n.. code-block:: python\n\n    import time\n    import board\n    from adafruit_onewire.bus import OneWireBus\n    import adafruit_ds2413\n\n    ow_bus = OneWireBus(board.D2)\n    ds = adafruit_ds2413.DS2413(ow_bus, ow_bus.scan()[0])\n\n    led = ds.IOA\n    button = ds.IOB\n    button.direction = adafruit_ds2413.INPUT\n\n    while not button.value:\n        led.value = True\n        time.sleep(0.5)\n        led.value = False\n        time.sleep(0.5)\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/ds2413/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_DS2413/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython library for DS2413 1-Wire Dual Channel Addressable Switch.",
    "version": "1.2.16",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_DS2413"
    },
    "split_keywords": [
        "adafruit",
        "haptic",
        "motor",
        "controller",
        "buzzer",
        "vibration",
        "breakout",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bb432f815e5a3a5ba111356ae85abbf73afc2411a776ad1228c438a53be92f2",
                "md5": "f400798b223225fb3cadf35ae9c6d96f",
                "sha256": "f244e51a8cc95d5944e163c9cc47ecdb5e051f781d85f88b4b611e11ee7abe58"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_ds2413-1.2.16-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f400798b223225fb3cadf35ae9c6d96f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5382,
            "upload_time": "2023-09-25T15:39:27",
            "upload_time_iso_8601": "2023-09-25T15:39:27.918537Z",
            "url": "https://files.pythonhosted.org/packages/7b/b4/32f815e5a3a5ba111356ae85abbf73afc2411a776ad1228c438a53be92f2/adafruit_circuitpython_ds2413-1.2.16-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e7378d469586b834aee11e0501faced1e7f3e4135c9cb40b5428c1dcdd41913",
                "md5": "2bc313fd8b94cafcc046f41c6071549d",
                "sha256": "95685414b4ddb9e375dfa85b07beb1ea3ed44a94042cd67d55803350d574f5cf"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-ds2413-1.2.16.tar.gz",
            "has_sig": false,
            "md5_digest": "2bc313fd8b94cafcc046f41c6071549d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26875,
            "upload_time": "2023-09-25T15:39:28",
            "upload_time_iso_8601": "2023-09-25T15:39:28.798482Z",
            "url": "https://files.pythonhosted.org/packages/8e/73/78d469586b834aee11e0501faced1e7f3e4135c9cb40b5428c1dcdd41913/adafruit-circuitpython-ds2413-1.2.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-25 15:39:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_DS2413",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-ds2413"
}
        
Elapsed time: 2.72602s