Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rplidar/badge/?version=latest
:target: https://docs.circuitpython.org/projects/rplidar/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_RPLIDAR/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_RPLIDAR
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
.. Provide a convenient interface to the Slamtec RPLidar.
Dependencies
=============
Install with PyPy: ``pip install Adafruit_CircuitPython_RPLIDAR``
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>`_.
Usage Example
=============
.. code-block:: python
import os
from math import floor
from adafruit_rplidar import RPLidar
# Setup the RPLidar
PORT_NAME = '/dev/ttyUSB0'
lidar = RPLidar(None, PORT_NAME, timeout=3)
# used to scale data to fit on the screen
max_distance = 0
def process_data(data):
print(data)
scan_data = [0]*360
try:
# print(lidar.get_info())
for scan in lidar.iter_scans():
for (_, angle, distance) in scan:
scan_data[min([359, floor(angle)])] = distance
process_data(scan_data)
except KeyboardInterrupt:
print('Stopping.')
lidar.stop()
lidar.disconnect()
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rplidar/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_RPLIDAR/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": "",
"name": "adafruit-circuitpython-rplidar",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adafruit,blinka,circuitpython,micropython,rplidar,lidar,sensors",
"author": "",
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/a6/18/a3536ecc67d011f1d9474c1f2a29704894f1614e04e35ee1aaa811d301d4/adafruit-circuitpython-rplidar-1.2.14.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rplidar/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/rplidar/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_RPLIDAR/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_RPLIDAR\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.. Provide a convenient interface to the Slamtec RPLidar.\n\nDependencies\n=============\n\nInstall with PyPy: ``pip install Adafruit_CircuitPython_RPLIDAR``\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\nUsage Example\n=============\n\n.. code-block:: python\n\n import os\n from math import floor\n from adafruit_rplidar import RPLidar\n\n\n # Setup the RPLidar\n PORT_NAME = '/dev/ttyUSB0'\n lidar = RPLidar(None, PORT_NAME, timeout=3)\n\n # used to scale data to fit on the screen\n max_distance = 0\n\n def process_data(data):\n print(data)\n\n scan_data = [0]*360\n\n try:\n # print(lidar.get_info())\n for scan in lidar.iter_scans():\n for (_, angle, distance) in scan:\n scan_data[min([359, floor(angle)])] = distance\n process_data(scan_data)\n\n except KeyboardInterrupt:\n print('Stopping.')\n lidar.stop()\n lidar.disconnect()\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rplidar/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_RPLIDAR/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "RPLidar support",
"version": "1.2.14",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_rplidar"
},
"split_keywords": [
"adafruit",
"blinka",
"circuitpython",
"micropython",
"rplidar",
"lidar",
"sensors"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "003ea615b1a203d314d3859623556836444911cc1e0213cd3a27da286ccc82e2",
"md5": "67206ff52af2825f18d741e6624cca38",
"sha256": "2989bb66434d549a0d4aed0a266bb62292f01269006eb3709d62b5d9ae54597b"
},
"downloads": -1,
"filename": "adafruit_circuitpython_rplidar-1.2.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "67206ff52af2825f18d741e6624cca38",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9312,
"upload_time": "2023-12-09T17:33:14",
"upload_time_iso_8601": "2023-12-09T17:33:14.529278Z",
"url": "https://files.pythonhosted.org/packages/00/3e/a615b1a203d314d3859623556836444911cc1e0213cd3a27da286ccc82e2/adafruit_circuitpython_rplidar-1.2.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a618a3536ecc67d011f1d9474c1f2a29704894f1614e04e35ee1aaa811d301d4",
"md5": "2f9bd064100b3703cbe69be015a814b1",
"sha256": "d8c38eb68574d8371d01442b6f961abe63e9c9acd091c55b252c3b2d335554be"
},
"downloads": -1,
"filename": "adafruit-circuitpython-rplidar-1.2.14.tar.gz",
"has_sig": false,
"md5_digest": "2f9bd064100b3703cbe69be015a814b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 30471,
"upload_time": "2023-12-09T17:33:15",
"upload_time_iso_8601": "2023-12-09T17:33:15.590689Z",
"url": "https://files.pythonhosted.org/packages/a6/18/a3536ecc67d011f1d9474c1f2a29704894f1614e04e35ee1aaa811d301d4/adafruit-circuitpython-rplidar-1.2.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 17:33:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_rplidar",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-circuitpython-rplidar"
}