Skip to main content

Introduction

Build Status Code Style: Black

Driver for an inexpensive laser rangefinder module, made by Hi-AT, available on aliexpress

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install circuitpython-laser-at

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

sudo pip3 install circuitpython-laser-at

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install circuitpython-laser-at

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:

pip3 install circup

With circup installed and your CircuitPython device connected use the following command to install:

circup install laser_at

Or the following command to update an existing version:

circup update

Usage Example

from board import UART
from laser_at import Laser
uart = UART()
uart.baudrate = 19200
laser = Laser(uart)
print(f"Distance is {laser.distance}")

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Metadata

Release files for circuitpython-laser-at 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for circuitpython-laser-at 0.9.0
File Size Uploaded
circuitpython-laser-at-0.9.0.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for circuitpython-laser-at 0.9.0
File Interpreter ABI Platform
circuitpython_laser_at-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / circuitpython-laser-at-0.9.0.tar.gz

Download URL circuitpython-laser-at-0.9.0.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
29a3699775dd4cd02cb29b00192edc1d7366ac3dca9473dca361171515aa2a62
BLAKE2b-256 checksum
How to use checksums
3228d812f39f2841c63c92d4fc196f2f03248554e32499af1a3e8102ac5aa893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / circuitpython_laser_at-0.9.0-py3-none-any.whl

Download URL circuitpython_laser_at-0.9.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82c077047d23135cd83ea7aa2d3e8c59790e9d65040617ffc87245c495d940f2
BLAKE2b-256 checksum
How to use checksums
32a0d0747ba44c066e4a47511ef9e0b604aea78c35da857262f2e6d004a36634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page