Skip to main content

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

Project description

harp.currentdriver

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.currentdriver

or

pip install harp.currentdriver

Usage example

from harp.protocol import OperationMode
from harp.devices.currentdriver import CurrentDriver

# Example usage of the CurrentDriver device
with CurrentDriver("/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_currentdriver-0.1.0a4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

harp_currentdriver-0.1.0a4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file harp_currentdriver-0.1.0a4.tar.gz.

File metadata

File hashes

Hashes for harp_currentdriver-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 86ec4a597f272b33f7eeb66be87cdc566f917c973c8e8f600a36bc22c0eecf7a
MD5 dc7a499707872f9fe44837440c6f96cd
BLAKE2b-256 f3c41abfc9b25042a05bf186830702afbf35f7174e8453f2bf1ee0f0a19c5505

See more details on using hashes here.

File details

Details for the file harp_currentdriver-0.1.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for harp_currentdriver-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 bc55e223f8f412e484b3989ba581144bf451fc1c6262944b0044938e3ea06785
MD5 1e93508b26ad907265c317265e901649
BLAKE2b-256 214a59d4bbc7e1f567e59d425bb5849b03685f92e2ca2d9bfb8459b6c3ba833c

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