p = expeyes.eyes17.open() import gettext gettext.bindtextdomain("expeyes") gettext.textdomain('expeyes') _ = gettext.gettext def set_freq(w): state = int(Sqr1.get()) fr = float(Sqr1.get()) res = p.set_sqr1(fr) w = Tk() Label(text=_('Use Slider to change SQR1 from 1 to 50 Hz')).pack(side=TOP) Sqr1 = Scale(w, command=set_freq, orient=HORIZONTAL, length=220, showvalue=True, from_=1, to=50, resolution=.1) Sqr1.pack(side=TOP) Button(text=_('QUIT'), command=sys.exit).pack(side=TOP) eyeplot.pop_image('pics/driven-pend.png', _('Driven Pendulum')) w.title(_('EYES Junior: Driven Pendulum')) w.mainloop()
b = Button(cf, text=_('FFT'), command=do_fft) b.pack(side=LEFT, anchor=SW) b = Button(cf, text=_('Save to'), command=save) b.pack(side=LEFT, anchor=SW) fn = Entry(cf, width=10, bg='white') fn.pack(side=LEFT, anchor=SW) fn.insert(END, 'sound.dat') Looping = IntVar() Loop = Checkbutton(cf, text=_('Enable Measurement'), variable=Looping, command=scope_mode) Loop.pack(side=LEFT, anchor=SW) Looping.set('0') b = Button(cf, text=_('QUIT'), command=quit) b.pack(side=RIGHT, anchor=SW) mf = Frame(root) # Message Frame below command frame. mf.pack(side=TOP, anchor=SW) msgwin = Label(mf, text=_('Messages'), fg='blue') msgwin.pack(side=LEFT, anchor=SW) eyeplot.pop_image('pics/sound.png', _('Velocity of Sound')) root.title(_('EYES Junior: Velocity of Sound')) root.after(10, update) root.mainloop()
Freq.insert(END,'3600') Start = Button(cf,text =_('START'), command = start, fg = 'blue') Start.pack(side=LEFT, anchor = SW) Stop = Button(cf,text =_('STOP'), command = stop, fg = 'blue') Stop.pack(side=LEFT, anchor = SW) b = Button(cf,text =_('Xmgrace'), command=xmgrace) b.pack(side=LEFT, anchor = SW) b = Button(cf,text =_('FFT'), command=do_fft) b.pack(side=LEFT, anchor = SW) b = Button(cf,text =_('Save to'), command=save) b.pack(side=LEFT, anchor = SW) fn = Entry(cf,width = 10, bg = 'white') fn.pack(side=LEFT, anchor = SW) fn.insert(END,'sound.dat') b = Button(cf,text =_('QUIT'), command=quit) b.pack(side=RIGHT, anchor = SW) mf = Frame(root) # Message Frame below command frame. mf.pack(side=TOP, anchor = SW) msgwin = Label(mf,text = _('Messages'), fg = 'blue') msgwin.pack(side=LEFT, anchor = SW) eyeplot.pop_image('pics/sound-inter.png', _('Sound Interference')) root.title(_('EYES: Interference of Sound')) root.mainloop()
Canvas(root, width=WIDTH, height=5).pack(side=TOP) # Some space at the top g = eyeplot.graph(root, width=WIDTH, height=HEIGHT) # make plot objects using draw.disp g.setWorld(0, -5 * VPERDIV, NP * delay * 0.001, 5 * VPERDIV, _('mS'), _('V')) cf = Frame(root, width=WIDTH, height=10) cf.pack(side=TOP, fill=BOTH, expand=1) b = Button(cf, text=_('Start Scanning'), command=base_scan) b.pack(side=LEFT, anchor=SW) b = Button(cf, text=_('Save to'), command=save) b.pack(side=LEFT, anchor=SW) fn = Entry(cf, width=10, bg='white') fn.pack(side=LEFT, anchor=SW) fn.insert(END, 'ind.dat') b = Button(cf, text=_('QUIT'), command=sys.exit) b.pack(side=RIGHT, anchor=SW) b = Button(cf, text=_('VIEW'), command=viewall) b.pack(side=RIGHT, anchor=SW) b4 = Button(cf, text=_('CLEAR'), command=clear) b4.pack(side=RIGHT, anchor=N) mf = Frame(root) # Message Frame below command frame. mf.pack(side=TOP, anchor=SW) msgwin = Label(mf, text=_('Messages'), fg='blue') msgwin.pack(side=LEFT, anchor=SW) eyeplot.pop_image('pics/induction.png', _('Electromagnetic Induction')) root.title(_('EYESJUN: Electromagnetic Induction')) root.mainloop()
cf = Frame(root, width=WIDTH, height=10) cf.pack(side=TOP, fill=BOTH, expand=1) b1 = Button(cf, text=_('START'), command=sr.start) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('STOP'), command=sr.stop) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('FIT'), command=sr.fit_curve) b1.pack(side=LEFT, anchor=N) b4 = Button(cf, text=_('CLEAR'), command=sr.clear) b4.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('Xmgrace'), command=sr.xmgrace) b1.pack(side=LEFT, anchor=N) b3 = Button(cf, text=_('SAVE to'), command=sr.save) b3.pack(side=LEFT, anchor=N) filename = StringVar() e1 = Entry(cf, width=15, bg='white', textvariable=filename) filename.set('sr04-dist.dat') e1.pack(side=LEFT) b5 = Button(cf, text=_('QUIT'), command=sys.exit) b5.pack(side=RIGHT, anchor=N) mf = Frame(root, width=WIDTH, height=10) mf.pack(side=TOP) msgwin = Label(mf, text=_('Message'), fg='blue') msgwin.pack(side=LEFT, anchor=S, fill=BOTH, expand=1) eyeplot.pop_image('pics/sr04-dist.png', _('Distance by SR04 Echo module')) root.title(_('Distance by Ultrasound Echo, SR04')) root.mainloop()
t=Entry(cf, width=5, bg = 'white', textvariable = Npoints) t.pack(side=LEFT, anchor = S) Npoints.set('900') l = Label(cf, text = _('Delay between samples=')) l.pack(side=LEFT) Delay = StringVar() t=Entry(cf, width=3, bg = 'white', textvariable = Delay) t.pack(side=LEFT, anchor = S) Delay.set('20') l = Label(cf, text = _('uS.')) l.pack(side=LEFT) l = Label(cf, text = _('PVS =')) l.pack(side=LEFT) PVS = StringVar() t=Entry(cf, width=5, bg = 'white', textvariable = PVS) t.pack(side=LEFT, anchor = S) PVS.set('3') l = Label(cf, text = 'V') l.pack(side=LEFT) mf = Frame(root) # Message Frame below command frame. mf.pack(side=TOP, anchor = SW) msgwin = Label(mf,text = _('Messages'), fg = 'blue') msgwin.pack(side=LEFT, anchor = SW) eyeplot.pop_image('pics/am.png', _('Amplitude Modulation')) root.title(_('Amplitude Modulation')) root.mainloop()
cf = Frame(root, width = WIDTH, height = 10) cf.pack(side=TOP, fill = BOTH, expand = 1) b1 = Button(cf, text = _('START'), command = start) b1.pack(side = LEFT, anchor = N) b3 = Button(cf, text = _('SAVE to'), command = save) b3.pack(side = LEFT, anchor = N) filename = StringVar() e1 =Entry(cf, width=15, bg = 'white', textvariable = filename) filename.set('diode_iv.dat') e1.pack(side = LEFT) b5 = Button(cf, text = _('QUIT'), command = sys.exit) b5.pack(side = RIGHT, anchor = N) b4 = Button(cf, text = _('CLEAR'), command = clear) b4.pack(side = RIGHT, anchor = N) b5 = Button(cf, text = _('Grace'), command = xmgrace) b5.pack(side = RIGHT, anchor = N) b5 = Button(cf, text = _('FIT'), command = fit_curve) b5.pack(side = RIGHT, anchor = N) mf = Frame(root, width = WIDTH, height = 10) mf.pack(side=TOP, fill = BOTH, expand = 1) msg = Label(mf,text=_('Message'), fg = 'blue') msg.pack(side=LEFT) eyeplot.pop_image('pics/diode-iv.png', _('Diode IV Characteristic')) root.title(_('EYES: Diode IV characteristics')) root.mainloop()
Ccs.pack(side=LEFT, anchor=SW) Label(cf, text=_('mA')).pack(side=LEFT, anchor=SW) b1 = Button(cf, text=_('Xmgrace'), command=pt.xmgrace) b1.pack(side=LEFT, anchor=N) b3 = Button(cf, text=_('SAVE to'), command=pt.save) b3.pack(side=LEFT, anchor=N) filename = StringVar() e1 = Entry(cf, width=15, bg='white', textvariable=filename) filename.set('pt100.dat') cf = Frame(root, width=WIDTH, height=10) cf.pack(side=TOP, fill=BOTH, expand=1) b1 = Button(cf, text=_('Freezing Point'), command=pt.get_freezing) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('Boiling Point'), command=pt.get_boiling) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('Calibrate'), command=pt.calibrate) b1.pack(side=LEFT, anchor=N) e1.pack(side=LEFT) b5 = Button(cf, text=_('QUIT'), command=pt.quit) b5.pack(side=RIGHT, anchor=N) mf = Frame(root, width=WIDTH, height=10) mf.pack(side=TOP) msgwin = Label(mf, text=_('Message'), fg='blue') msgwin.pack(side=LEFT, anchor=S, fill=BOTH, expand=1) eyeplot.pop_image('pics/pt100.png', _('Temperatue by PT100')) root.title(_('Temperature measuements using PT100')) root.mainloop()
b4 = Button(cf, text=_('CLEAR'), command=clear) b4.pack(side=LEFT, anchor=N) b = Button(cf, text=_('Save to'), command=save) b.pack(side=LEFT, anchor=SW) fn = Entry(cf, width=10, bg='white') fn.pack(side=LEFT, anchor=SW) fn.insert(END, 'rl.dat') cf = Frame(root, width=WIDTH, height=10) cf.pack(side=TOP, fill=BOTH, expand=1) b = Button(cf, text=_('Xmgrace'), command=xmgrace) b.pack(side=LEFT, anchor=SW) l = Label(cf, text=_('Rext=')) l.pack(side=LEFT, anchor=SW) Res = Entry(cf, width=10, bg='white') Res.pack(side=LEFT, anchor=SW) Res.insert(END, '1000') b = Button(cf, text=_('Calculate R/L'), command=fit_curve) b.pack(side=LEFT, anchor=SW) b = Button(cf, text=_('QUIT'), command=sys.exit) b.pack(side=RIGHT, anchor=SW) mf = Frame(root) # Message Frame below command frame. mf.pack(side=TOP) msgwin = Label(mf, text='', fg='blue') msgwin.pack(side=LEFT, anchor=S, fill=BOTH) eyeplot.pop_image('pics/RLcircuit.png', _('RL Circuit, Transient')) root.title(_('Transient response of RL Circuit')) root.mainloop()
Freq.insert(0, '150') Label(f, text=_('Hz R=')).pack(side=LEFT) Res = Entry(f, width=4) Res.pack(side=LEFT, anchor=N) Res.insert(0, '1000') Label(f, text=_('Ohm')).pack(side=LEFT) f = Frame(rf) f.pack(side=TOP, anchor=W) Label(f, text=_('C=')).pack(side=LEFT) Cap = Entry(f, width=4) Cap.pack(side=LEFT, anchor=N) Cap.insert(0, '1') Label(f, text=_('uF. L=')).pack(side=LEFT) Ind = Entry(f, width=4) Ind.pack(side=LEFT, anchor=N) Ind.insert(0, '100') Label(f, text=_('mH')).pack(side=LEFT) Calc = Button(rf, text=_('Calculate XL, XC and Angle'), command=calc) Calc.pack(side=TOP) Calc2 = Label(rf, text='') Calc2.pack(side=TOP) #--------------- set_frequency(0) eyeplot.pop_image('pics/ac-circuits.png', _('Study of AC Circuit')) root.title(_('Study of AC Circuits')) root.after(10, update) root.mainloop()
f1.pack(side=TOP, fill=BOTH, expand=1) Label(f1, text=_('PV1=')).pack(side=LEFT) Wpv1 = Entry(f1, width=5) Wpv1.pack(side=LEFT) Wpv1.bind("<Return>", set_level) Wpv1.delete(0, END) Wpv1.insert(0, str(1.0)) Label(f1, text=_('V ')).pack(side=LEFT) Save = Button(f1, text=_('Save Traces to'), command=save_data) Save.pack(side=LEFT, anchor=N) Fname = Entry(f1, width=12) Fname.pack(side=LEFT) Fname.insert(0, 'clipping.txt') Save = Button(f1, text=_('XmGrace'), command=xmgrace) Save.pack(side=LEFT, anchor=N) Quit = Button(f1, text=_('QUIT'), command=sys.exit) Quit.pack(side=LEFT, anchor=N) mf = Frame(f) mf.pack(side=TOP, fill=BOTH, expand=1) msgwin = Label(mf, text=_(''), fg='blue') msgwin.pack(side=LEFT) #, anchor = SW) eyeplot.pop_image('pics/clipping.png', _('Diode Clipping')) root.title(_('Diode Clipping')) root.after(10, update) root.mainloop()
g.setWorld(MINX, MINY, MAXX, MAXY,_('V'),_('mA')) cf = Frame(root, width = WIDTH, height = 10) cf.pack(side=TOP, fill = BOTH, expand = 1) b1 = Button(cf, text = _('START'), command = start) b1.pack(side = LEFT, anchor = N) b3 = Button(cf, text = _('SAVE to'), command = save) b3.pack(side = LEFT, anchor = N) filename = StringVar() e1 =Entry(cf, width=15, bg = 'white', textvariable = filename) filename.set('LCfilter.dat') e1.pack(side = LEFT) b5 = Button(cf, text = _('QUIT'), command = sys.exit) b5.pack(side = RIGHT, anchor = N) b4 = Button(cf, text = _('CLEAR'), command = clear) b4.pack(side = RIGHT, anchor = N) b5 = Button(cf, text = _('Grace'), command = xmgrace) b5.pack(side = RIGHT, anchor = N) mf = Frame(root, width = WIDTH, height = 10) mf.pack(side=TOP, fill = BOTH, expand = 1) msg = Label(mf,text=_('Message'), fg = 'blue') msg.pack(side=LEFT) eyeplot.pop_image('pics/filter.png', _('Filter frequency response')) root.title(_('EYES: Bode Plot')) root.mainloop()
cf = Frame(root, width=WIDTH, height=10) cf.pack(side=TOP, fill=BOTH, expand=1) b1 = Button(cf, text=_('START'), command=pen.start) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('STOP'), command=pen.stop) b1.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('FIT'), command=pen.fit_curve) b1.pack(side=LEFT, anchor=N) b4 = Button(cf, text=_('CLEAR'), command=pen.clear) b4.pack(side=LEFT, anchor=N) b1 = Button(cf, text=_('Xmgrace'), command=pen.xmgrace) b1.pack(side=LEFT, anchor=N) b3 = Button(cf, text=_('SAVE to'), command=pen.save) b3.pack(side=LEFT, anchor=N) filename = StringVar() e1 = Entry(cf, width=15, bg='white', textvariable=filename) filename.set('pendulum.dat') e1.pack(side=LEFT) b5 = Button(cf, text=_('QUIT'), command=sys.exit) b5.pack(side=RIGHT, anchor=N) mf = Frame(root, width=WIDTH, height=10) mf.pack(side=TOP) msgwin = Label(mf, text=_('Message'), fg='blue') msgwin.pack(side=LEFT, anchor=S, fill=BOTH, expand=1) eyeplot.pop_image('pics/pend-wave.png', _('Pendulum Oscillations')) root.title(_('Oscillations of Pendulum')) root.mainloop()
Label(f1, text=_('Timebase')).pack(side=LEFT, anchor=SW) # Sliders for Adjusting Axes timebase = Scale(f1,command = set_timebase, orient=HORIZONTAL, length=LPWIDTH, showvalue=False,\ from_ = 0, to=9, resolution=1) timebase.pack(side=LEFT, anchor=SW) timebase.set(5) Label(f1, text=_('mSec/div')).pack(side=LEFT, anchor=SW) # Sliders for Adjusting Axes Save = Button(f1, text=_('Save Traces to'), command=save_data) Save.pack(side=LEFT, anchor=N) Fname = Entry(f1, width=8) Fname.pack(side=LEFT) Fname.insert(0, 'halfwave.txt') Save = Button(f1, text=_('XmGrace'), command=xmgrace) Save.pack(side=LEFT, anchor=N) Quit = Button(f1, text=_('QUIT'), command=sys.exit) Quit.pack(side=LEFT, anchor=N) mf = Frame(f) mf.pack(side=TOP, fill=BOTH, expand=1) msgwin = Label(mf, text=_('Connect WG to A1, Diode from A1 to A2.'), fg='blue') msgwin.pack(side=LEFT) #, anchor = SW) set_frequency(1) eyeplot.pop_image('pics/halfwave.png', _('Halfwave Rectifier')) root.title(_('Halfwave Rectifier')) root.after(10, update) root.mainloop()
timebase.pack(side=LEFT, anchor=SW) timebase.set(5) Label(f1, text=_('mSec/div')).pack(side=LEFT, anchor=SW) # Sliders for Adjusting Axes Save = Button(f1, text=_('Save Traces to'), command=save_data) Save.pack(side=LEFT, anchor=N) Fname = Entry(f1, width=8) Fname.pack(side=LEFT) Fname.insert(0, 'osc555.txt') Save = Button(f1, text=_('XmGrace'), command=xmgrace) Save.pack(side=LEFT, anchor=N) Freq = Button(f1, text=_('Freqency'), command=show_freq) Freq.pack(side=LEFT, anchor=N) Quit = Button(f1, text=_('QUIT'), command=sys.exit) Quit.pack(side=LEFT, anchor=N) mf = Frame(f) mf.pack(side=TOP, fill=BOTH, expand=1) msgwin = Label(mf, text=_('Connect 555 output to A1, and IN2'), fg='blue') msgwin.pack(side=LEFT) #, anchor = SW) p.set_sqr1(1000, 20) eyeplot.pop_image('pics/osc555.png', _('IC555 Oscillator')) root.title(_('IC555 Astable multi-vibrator')) root.after(10, update) root.mainloop()
e.pack(side = LEFT) l = Label(cf, text='V') l.pack(side=LEFT, anchor = SW ) b1 = Button(cf, text = _('START'), command = start) b1.pack(side = LEFT, anchor = N) b3 = Button(cf, text = _('SAVE to'), command = save) b3.pack(side = LEFT, anchor = N) filename = StringVar() e1 =Entry(cf, width=15, bg = 'white', textvariable = filename) filename.set('tran_ce.dat') e1.pack(side = LEFT) b5 = Button(cf, text = _('QUIT'), command = sys.exit) b5.pack(side = RIGHT, anchor = N) b4 = Button(cf, text = _('CLEAR'), command = clear) b4.pack(side = RIGHT, anchor = N) b5 = Button(cf, text = _('Grace'), command = xmgrace) b5.pack(side = RIGHT, anchor = N) #b5 = Button(cf, text = _('LINE'), command = load_line) #b5.pack(side = RIGHT, anchor = N) mf = Frame(root, width = WIDTH, height = 10) mf.pack(side=TOP, fill = BOTH, expand = 1) msg = Label(mf,text=_('Message'), fg = 'blue') msg.pack(side=LEFT) eyeplot.pop_image('pics/transistor-ce.png', _('Transistor CE Char (NPN)')) root.title(_('EYES Junior: Transistor CE characteristics')) root.mainloop()