forked from awendt/pyrelacs
30 lines
697 B
Python
30 lines
697 B
Python
import uldaq
|
|
from IPython import embed
|
|
import typer
|
|
|
|
from pyrelacs.util.logging import config_logging
|
|
|
|
log = config_logging()
|
|
|
|
class ReadData():
|
|
def __init__(self) -> None:
|
|
devices = uldaq.get_daq_device_inventory(uldaq.InterfaceType.USB)
|
|
log.debug(f"Found daq devices {len(devices)}, connecting to the first one")
|
|
self.daq_device = uldaq.DaqDevice(devices[0])
|
|
self.daq_device.connect()
|
|
log.debug("Connected")
|
|
|
|
def read_analog_in(self):
|
|
# Get the Ananlog In device and Analog Info
|
|
ai_device = self.daq_device.get_ai_device()
|
|
ai_info = self.daq_device.get_info()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
daq_input = Input_daq()
|
|
|