Skip to main content

This is a generated Harp device Python interface that interacts with the Harp protocol.

Project description

harp.laserdrivercontroller

PyPI

This is a generated Harp device Python interface that interacts with the Harp protocol.

Installation

You can install the package using uv or pip:

uv add harp.laserdrivercontroller

or

pip install harp.laserdrivercontroller

Usage example

from harp.protocol import OperationMode
from harp.devices.laserdrivercontroller import LaserDriverController

# Example usage of the LaserDriverController device
with LaserDriverController("/dev/ttyUSB0") as device: # For Windows, use "COM8" or similar
    device.info()

    # Set the device to active mode
    device.set_mode(OperationMode.ACTIVE)

    # Get the events
    try:
        while True:
            for event in device.get_events():
                # Do what you need with the event
                print(event.payload)
    except KeyboardInterrupt:
        # Capture Ctrl+C to exit gracefully
        print("Exiting...")
    finally:
        # Do what you need to do to clean up. Disconnect is automatically called with the "with" statement.
        pass

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

harp_laserdrivercontroller-0.1.0a3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harp_laserdrivercontroller-0.1.0a3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file harp_laserdrivercontroller-0.1.0a3.tar.gz.

File metadata

File hashes

Hashes for harp_laserdrivercontroller-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 834bb099c5fc9153ff1d3391b974ce01a91aebc440f3cc12758c4c9cd271702b
MD5 7ddc4f94476459e3da8008765b09daca
BLAKE2b-256 2c45caab6172c7ba6afe4ec69d6977d29d1158689a8f1fc47e0be5e8858714f9

See more details on using hashes here.

File details

Details for the file harp_laserdrivercontroller-0.1.0a3-py3-none-any.whl.

File metadata

File hashes

Hashes for harp_laserdrivercontroller-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 76bb403bea9cd7907b093968900ff898d9e2ca8d30ff35b2091f8919166923bc
MD5 df3405019407c244be9e3a4c964e7b32
BLAKE2b-256 5c7ffc9b087b07a36d788e363598e79105a5e1c03c2ca3a84c7a5e19de04bc36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page