Introduction
============
.. image:: https://readthedocs.org/projects/circuitpython-vl53lxcx/badge/?version=latest
:target: https://circuitpython-vl53lxcx.readthedocs.io/
:alt: Documentation Status
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/sensebox/CircuitPython_VL53LxCX/workflows/Build%20CI/badge.svg
:target: https://github.com/sensebox/CircuitPython_VL53LxCX/actions
:alt: Build Status
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Code Style: Ruff
CircuitPython driver for VL53L5CX and VL53L8CX ToF sensors
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://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.
Installing from PyPI
=====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/circuitpython-vl53lxcx/>`_.
To install for current user:
.. code-block:: shell
pip3 install circuitpython-vl53lxcx
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install circuitpython-vl53lxcx
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install circuitpython-vl53lxcx
Installing to a Connected CircuitPython Device with Circup
==========================================================
Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:
.. code-block:: shell
pip3 install circup
With ``circup`` installed and your CircuitPython device connected use the
following command to install:
.. code-block:: shell
circup install vl53lxcx
Or the following command to update an existing version:
.. code-block:: shell
circup update
Usage Example
=============
.. code-block:: python
from vl53lxcx import (
DATA_DISTANCE_MM,
DATA_TARGET_STATUS,
RESOLUTION_8X8,
STATUS_VALID,
VL53L8CX,
)
i2c = busio.I2C(board.SCL, board.SDA, frequency=1_000_000)
lpn = DigitalInOut(board.D3)
lpn.direction = Direction.OUTPUT
lpn.value = True
tof = VL53L8CX(i2c, lpn=lpn)
def main():
tof.reset()
if not tof.is_alive():
raise ValueError("VL53L8CX not detected")
tof.init()
tof.resolution = RESOLUTION_8X8
grid = 7
tof.ranging_freq = 2
tof.start_ranging({DATA_DISTANCE_MM, DATA_TARGET_STATUS})
while True:
if tof.check_data_ready():
results = tof.get_ranging_data()
distance = results.distance_mm
status = results.target_status
# enumerate(distance) ...
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://circuitpython-vl53lxcx.readthedocs.io/>`_.
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/sensebox/CircuitPython_VL53LxCX/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": null,
"name": "circuitpython-vl53lxcx",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, blinka, circuitpython, micropython, vl53lxcx, VL53L5CX, VL53L8CX",
"author": null,
"author_email": "senseBox <info@sensebox.de>",
"download_url": "https://files.pythonhosted.org/packages/b5/af/a7925b96c304f47db4c658f2b20e2000e43125c0099982cf4e9aa466d051/circuitpython_vl53lxcx-0.0.1.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/circuitpython-vl53lxcx/badge/?version=latest\n :target: https://circuitpython-vl53lxcx.readthedocs.io/\n :alt: Documentation Status\n\n\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n\n.. image:: https://github.com/sensebox/CircuitPython_VL53LxCX/workflows/Build%20CI/badge.svg\n :target: https://github.com/sensebox/CircuitPython_VL53LxCX/actions\n :alt: Build Status\n\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n :target: https://github.com/astral-sh/ruff\n :alt: Code Style: Ruff\n\nCircuitPython driver for VL53L5CX and VL53L8CX ToF sensors\n\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://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\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/circuitpython-vl53lxcx/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n pip3 install circuitpython-vl53lxcx\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install circuitpython-vl53lxcx\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 .env/bin/activate\n pip3 install circuitpython-vl53lxcx\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n circup install vl53lxcx\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n from vl53lxcx import (\n DATA_DISTANCE_MM,\n DATA_TARGET_STATUS,\n RESOLUTION_8X8,\n STATUS_VALID,\n VL53L8CX,\n )\n\n i2c = busio.I2C(board.SCL, board.SDA, frequency=1_000_000)\n\n lpn = DigitalInOut(board.D3)\n lpn.direction = Direction.OUTPUT\n lpn.value = True\n\n tof = VL53L8CX(i2c, lpn=lpn)\n\n def main():\n tof.reset()\n\n if not tof.is_alive():\n raise ValueError(\"VL53L8CX not detected\")\n\n tof.init()\n\n tof.resolution = RESOLUTION_8X8\n grid = 7\n\n tof.ranging_freq = 2\n\n tof.start_ranging({DATA_DISTANCE_MM, DATA_TARGET_STATUS})\n\n while True:\n if tof.check_data_ready():\n results = tof.get_ranging_data()\n distance = results.distance_mm\n status = results.target_status\n\n # enumerate(distance) ...\n\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs <https://circuitpython-vl53lxcx.readthedocs.io/>`_.\n\nFor information on building library documentation, please check out\n`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/sensebox/CircuitPython_VL53LxCX/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CircuitPython driver for VL53L5CX and VL53L8CX ToF sensors",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/sensebox/CircuitPython_VL53LxCX"
},
"split_keywords": [
"adafruit",
" blinka",
" circuitpython",
" micropython",
" vl53lxcx",
" vl53l5cx",
" vl53l8cx"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f0fc001367b36b2c7e2da1c8fee33245a27b2aa9ea7495bb6f9719db84486db5",
"md5": "bc3caeff2ab44c5085603cccc2f1cb99",
"sha256": "07766c1d11d7f3aadb126f60a3410c1bca61d00280c0eba94563fb2d6ea3415c"
},
"downloads": -1,
"filename": "circuitpython_vl53lxcx-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc3caeff2ab44c5085603cccc2f1cb99",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4942,
"upload_time": "2025-08-20T14:54:19",
"upload_time_iso_8601": "2025-08-20T14:54:19.640937Z",
"url": "https://files.pythonhosted.org/packages/f0/fc/001367b36b2c7e2da1c8fee33245a27b2aa9ea7495bb6f9719db84486db5/circuitpython_vl53lxcx-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b5afa7925b96c304f47db4c658f2b20e2000e43125c0099982cf4e9aa466d051",
"md5": "88f02ae20371c2717f6388151cbcf6aa",
"sha256": "38ec3cf4e4b1c1f77fbeb072f1eb5c3a57a17365ccf27c6305fadfccd3655d22"
},
"downloads": -1,
"filename": "circuitpython_vl53lxcx-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "88f02ae20371c2717f6388151cbcf6aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 236964,
"upload_time": "2025-08-20T14:54:22",
"upload_time_iso_8601": "2025-08-20T14:54:22.023848Z",
"url": "https://files.pythonhosted.org/packages/b5/af/a7925b96c304f47db4c658f2b20e2000e43125c0099982cf4e9aa466d051/circuitpython_vl53lxcx-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-20 14:54:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sensebox",
"github_project": "CircuitPython_VL53LxCX",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-busdevice",
"specs": []
},
{
"name": "adafruit-circuitpython-register",
"specs": []
}
],
"lcname": "circuitpython-vl53lxcx"
}