2
0
forked from awendt/pyrelacs
minipyrelacs/pyrelacs/input.py

21 lines
488 B
Python

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}")
print(f"Connected to daq_device {daq_device.is_connected()}")
except uldaq.ULException as e:
print('\n', e)
if __name__ == '__main__':
typer.run(connect)