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": null,
"name": "adafruit-circuitpython-lsm303-accel",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, lsm303, 6dof, 6-dof, accelerometer, axisbreakout, hardware, micropython, circuitpython",
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/5e/a7/a01b1743b86288327658253cc3d3eb0df19c1e984de6e6929ad8b495246e/adafruit_circuitpython_lsm303_accel-1.1.22.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.22",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_LSM303_Accel"
},
"split_keywords": [
"adafruit",
" lsm303",
" 6dof",
" 6-dof",
" accelerometer",
" axisbreakout",
" hardware",
" micropython",
" circuitpython"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "955f988791ddd02c445df2f3354f138e360108908f94bed03dc97b3645dad0ff",
"md5": "2cfc2bd251e970658809c904706a27fe",
"sha256": "04de70c36759a10617583f9d03f6ff1e8c2ccdbb537d998e515c32558e7cfe2f"
},
"downloads": -1,
"filename": "adafruit_circuitpython_lsm303_accel-1.1.22-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2cfc2bd251e970658809c904706a27fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7868,
"upload_time": "2024-10-07T22:06:15",
"upload_time_iso_8601": "2024-10-07T22:06:15.121932Z",
"url": "https://files.pythonhosted.org/packages/95/5f/988791ddd02c445df2f3354f138e360108908f94bed03dc97b3645dad0ff/adafruit_circuitpython_lsm303_accel-1.1.22-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ea7a01b1743b86288327658253cc3d3eb0df19c1e984de6e6929ad8b495246e",
"md5": "c31645f62f0928eff577d1fa9fdf8529",
"sha256": "95425eb26fe4883eaad03dbb20d8262b562d9b781dd33b3d9079e6907b23020d"
},
"downloads": -1,
"filename": "adafruit_circuitpython_lsm303_accel-1.1.22.tar.gz",
"has_sig": false,
"md5_digest": "c31645f62f0928eff577d1fa9fdf8529",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29461,
"upload_time": "2024-10-07T22:06:16",
"upload_time_iso_8601": "2024-10-07T22:06:16.924074Z",
"url": "https://files.pythonhosted.org/packages/5e/a7/a01b1743b86288327658253cc3d3eb0df19c1e984de6e6929ad8b495246e/adafruit_circuitpython_lsm303_accel-1.1.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-07 22:06:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_LSM303_Accel",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-circuitpython-lsm303-accel"
}