import cbp.keithley_stardice
import numpy as np
import time
k = cbp.keithley_stardice.Keithley2000('/dev/ttyUSB2', baudrate = 19200, buff=1024)
k.setup(nsamples=100, mode='RES', krange=2000)
#k.set_func('RES')

#k.set_freq()
k.set_rate(1)
#k.set_timer(0.01)
k.trig_init()
#time.sleep(2)
#toto = k.buff_read()
#toto = k.read()
#print(np.gradient(toto[1]))
