import time

from NerveController import NerveController

# Please change this to be the IP address of the driver in your network
nerve_domain = 'http://192.168.10.10/'

sq = NerveController(nerve_domain)

sq.startIv(0, 50, 1, 100)

# Wait for the sweep to finish: 51 steps of 100 ms, plus a bit of overhead.
time.sleep(6)
sq.stopIv()

traces = sq.getIvData()

channels = list(traces.keys())
first_channel = channels[0]

print(f"Data for channel {first_channel}:")
print("Bias Current (uA):")
print(traces[first_channel]['biasI'])
print("Monitor Voltage (V):")
print(traces[first_channel]['monitorV'])
