Skip to main content

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

Project description

harp.olfactometer

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

or

pip install harp.olfactometer

Usage example

from harp.protocol import OperationMode
from harp.devices.olfactometer import Olfactometer

# Example usage of the Olfactometer device
with Olfactometer("/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_olfactometer-0.1.0a3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

harp_olfactometer-0.1.0a3-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: harp_olfactometer-0.1.0a3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for harp_olfactometer-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 112ff4376a7830d6ec74a03cebf2aa308d589971b5be046906b7172d2dd7aa2c
MD5 e5a7720a04ca98138a67ba12293b204c
BLAKE2b-256 74801ba7dd74cea1bf5ec09e8b4d6a965333cdb39b4da6f96718a96ac62a572c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for harp_olfactometer-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 900dde2683234d592743b5b755158d18c7f754bba8ea782a51fd67b5bcc5b378
MD5 b68d12f0767ca9b0ec332dc72f4c1a57
BLAKE2b-256 216e221b778f0868a243326d2f9d6b051f0b848e1eb12aba1b74ca132c1085e9

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