Debian Codegraph @

eyes17/examples/diodeIV.py

raw
1 import eyes17.eyes
2 p = eyes17.eyes.open()
3
4 from pylab import *
5
6 voltage = []
7 current = []
8
9 v = 0.0
10 while v <= 5.0:
11 va = set_pv1(v)
12 vd = get_voltage('A1')
13 i = (va-vd)/1.0 # current in milli Amps
14 voltage.append(vd)
15 current.append(i)
16 v = v + 0.050 # 50 mV step
17
18 xlabel('Voltage')
19 ylabel('Current')
20 plot(voltage, current, linewidth = 2)
21 show()