Device driver for the egismos series of lasers, available at https://www.egismos.com/laser-measuring-optoelectronics-module
Project description
Introduction
Device driver for the egismos series of lasers, available at https://www.egismos.com/laser-measuring-optoelectronics-module
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-egismos
To install system-wide (this may be required in some cases):
sudo pip3 install circuitpython-laser-egismos
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-egismos
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_egismos
Or the following command to update an existing version:
circup update
Usage Example
import time
import board
import busio
import digitalio
from laser_egismos import Laser
laser_power = digitalio.DigitalInOut(board.D10)
laser_power.switch_to_output(True)
uart = busio.UART(board.D8, board.D9, baudrate=9600)
laser = Laser(uart)
laser.set_buzzer(False)
laser.set_laser(True)
time.sleep(3)
laser.set_laser_(False)
time.sleep(0.1)
print(f"Distance is {laser.distance}cm")
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for circuitpython-laser-egismos-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87b1594da92b0546c3fa555049fabbb09a0328368de1a9aaf5b971f074e57268 |
|
MD5 | 9409753545460b729b3437def88d5393 |
|
BLAKE2b-256 | db67e3634a4a2a6201c7faf49bc0797a514d13dea7b52a44f3a053549b548b19 |
Hashes for circuitpython_laser_egismos-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 593504b80fec66ab2dce640ebd831d39e90928c206b12a4956d391d6d2994086 |
|
MD5 | daa65174a933362d85ae3b983b9bcfe8 |
|
BLAKE2b-256 | 1e69ec4de4f31bd61acb2e7262f37860767e738b6128223d988f6a5aa168de82 |