adafruit-circuitpython-lsm303-accel


Nameadafruit-circuitpython-lsm303-accel JSON
Version 1.1.17 PyPI version JSON
download
home_page
SummaryCircuitPython library for LSM303 's 3-axis accelerometer.
upload_time2023-01-16 22:38:10
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit lsm303 6dof 6-dof accelerometer axisbreakout 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-lsm303/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/lsm303-accel/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_LSM303_Accel/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_LSM303_Accel/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

Adafruit CircuitPython module for the LSM303's accelerometer

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

.. code-block:: shell

    pip3 install adafruit-circuitpython-lsm303_accel

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

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-lsm303_accel

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

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

.. code-block:: python3

        import time
        import board
        import adafruit_lsm303_accel

        i2c = board.I2C()  # uses board.SCL and board.SDA
        sensor = adafruit_lsm303_accel.LSM303_Accel(i2c)

        while True:
            acc_x, acc_y, acc_z = sensor.acceleration

            print('Acceleration (m/s^2): ({0:10.3f}, {1:10.3f}, {2:10.3f})'.format(acc_x, acc_y, acc_z))
            print('')
            time.sleep(1.0)


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

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-lsm303-accel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,lsm303,6dof,6-dof,accelerometer,axisbreakout,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/c0/e3/d5a553264d8cc2470928ccab2e8c2322934c16fe45bfee1fb54ef446d3bb/adafruit-circuitpython-lsm303-accel-1.1.17.tar.gz",
    "platform": null,
    "description": "\nIntroduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-lsm303/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/lsm303-accel/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_LSM303_Accel/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_LSM303_Accel/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\nAdafruit CircuitPython module for the LSM303's accelerometer\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://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-lsm303_accel/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-lsm303_accel\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-lsm303_accel\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-lsm303_accel\n\nUsage Example\n=============\n\n.. code-block:: python3\n\n        import time\n        import board\n        import adafruit_lsm303_accel\n\n        i2c = board.I2C()  # uses board.SCL and board.SDA\n        sensor = adafruit_lsm303_accel.LSM303_Accel(i2c)\n\n        while True:\n            acc_x, acc_y, acc_z = sensor.acceleration\n\n            print('Acceleration (m/s^2): ({0:10.3f}, {1:10.3f}, {2:10.3f})'.format(acc_x, acc_y, acc_z))\n            print('')\n            time.sleep(1.0)\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/lsm303-accel/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_LSM303_Accel/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython library for LSM303 's 3-axis accelerometer.",
    "version": "1.1.17",
    "split_keywords": [
        "adafruit",
        "lsm303",
        "6dof",
        "6-dof",
        "accelerometer",
        "axisbreakout",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c2dc3ce98dbebc98fce83b8ac9b632ad4a1df0ae776b7943a3ee83ada934638",
                "md5": "7a77860daa756571954a25d8b46a12ec",
                "sha256": "12f77399c04df0401e70d1e0b30b96e7b866fe8a926d8455049fed0593a3044a"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_lsm303_accel-1.1.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7a77860daa756571954a25d8b46a12ec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7871,
            "upload_time": "2023-01-16T22:38:09",
            "upload_time_iso_8601": "2023-01-16T22:38:09.307871Z",
            "url": "https://files.pythonhosted.org/packages/8c/2d/c3ce98dbebc98fce83b8ac9b632ad4a1df0ae776b7943a3ee83ada934638/adafruit_circuitpython_lsm303_accel-1.1.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0e3d5a553264d8cc2470928ccab2e8c2322934c16fe45bfee1fb54ef446d3bb",
                "md5": "ab55851bb8a88abfedf11105e34ae52b",
                "sha256": "300035578bfd26864dc624c8a2d0d9c22ec478578474575f96091e26886577a8"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-lsm303-accel-1.1.17.tar.gz",
            "has_sig": false,
            "md5_digest": "ab55851bb8a88abfedf11105e34ae52b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29505,
            "upload_time": "2023-01-16T22:38:10",
            "upload_time_iso_8601": "2023-01-16T22:38:10.716878Z",
            "url": "https://files.pythonhosted.org/packages/c0/e3/d5a553264d8cc2470928ccab2e8c2322934c16fe45bfee1fb54ef446d3bb/adafruit-circuitpython-lsm303-accel-1.1.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 22:38:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "adafruit-circuitpython-lsm303-accel"
}
        
Elapsed time: 0.03630s