From 190882dc9c582866cc51da123d4f5c9ef1665115 Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Mon, 16 Sep 2024 15:47:36 +0200 Subject: [PATCH] adding reading of the daq product name --- pyrelacs/input.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pyrelacs/input.py diff --git a/pyrelacs/input.py b/pyrelacs/input.py new file mode 100644 index 0000000..0d8a6df --- /dev/null +++ b/pyrelacs/input.py @@ -0,0 +1,19 @@ +import uldaq +from IPython import embed +import typer + + +def connect(): + try: + devices = uldaq.get_daq_device_inventory(uldaq.InterfaceType.USB) + daq_device = uldaq.DaqDevice(devices[0]) + daq_device.connect() + print(f"Connected to daq_device {devices[0].product_name}") + + except uldaq.ULException as e: + print('\n', e) + + +if __name__ == '__main__': + typer.run(connect) +