eyes17/code/RCdifferentiation.py
raw| 1 | #import eyes17.eyes # uncomment these two lines while running stand-alone |
| 2 | #p = eyes17.eyes.open() |
| 3 | |
| 4 | from pylab import * |
| 5 | |
| 6 | p.set_wave(50,'tria') |
| 7 | p.select_range('A1',4) |
| 8 | p.select_range('A2',4) |
| 9 | |
| 10 | t,v, tt,vv = p.capture2(500, 100) # captures A1 and A2 |
| 11 | |
| 12 | xlabel('Time(mS)') |
| 13 | ylabel('Voltage(V)') |
| 14 | plot([0,1], [0,0], 'black') |
| 15 | ylim([-4,4]) |
| 16 | |
| 17 | plot(t,v,linewidth = 2, color = 'blue') |
| 18 | plot(tt, vv, linewidth = 2, color = 'red') |
| 19 | |
| 20 | show() |