Esempio n. 1
0
p = eyes.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()
Esempio n. 2
0
	h =Entry(cf, width=5, bg = 'white', textvariable = Hstrings[k])
	h.pack(side=LEFT)
	Hstrings[k].set(str(hvals[k]))
	l = Label(cf, text = _('cm'))
	l.pack(side = LEFT, anchor = SW)
	b = Button(cf, text = _('Measure TOF'), command = lambda i=k : get_tof(i))
	b.pack(side = LEFT, anchor = N)
	Results[k] = Label(cf, text = ' '*30)
	Results[k].pack(side = LEFT, anchor = SW)

mf = Frame(root)
mf.pack(side=TOP,  fill = BOTH, expand = 1)
msgwin = Label(mf,text=_('Acceleration due to gravity by Time of Flight'), fg = 'blue')
msgwin.pack(side=LEFT, anchor = S, fill=BOTH, expand=1)

cf = Frame(root)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
b5 = Button(cf, text = _('FIT'), command = calc_g)
b5.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,'gravity.dat')
b5 = Button(cf, text = _('QUIT'), command = sys.exit)
b5.pack(side = RIGHT, anchor = N)

eyeplot.pop_image('pics/g-tof.png', _('Gravity by TOF'))
root.title(_('Gravity by Time of Flight'))
root.mainloop()
Esempio n. 3
0
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()

Esempio n. 4
0
    h = Entry(cf, width=5, bg="white", textvariable=Hstrings[k])
    h.pack(side=LEFT)
    Hstrings[k].set(str(hvals[k]))
    l = Label(cf, text="cm")
    l.pack(side=LEFT, anchor=SW)
    b = Button(cf, text="Measure TOF", command=lambda i=k: get_tof(i))
    b.pack(side=LEFT, anchor=N)
    Results[k] = Label(cf, text=" " * 30)
    Results[k].pack(side=LEFT, anchor=SW)

mf = Frame(root)
mf.pack(side=TOP, fill=BOTH, expand=1)
msgwin = Label(mf, text="Acceleration due to gravity by Time of Flight", fg="blue")
msgwin.pack(side=LEFT, anchor=S, fill=BOTH, expand=1)

cf = Frame(root)
cf.pack(side=TOP, fill=BOTH, expand=1)
b5 = Button(cf, text="FIT", command=calc_g)
b5.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, "gravity.dat")
b5 = Button(cf, text="QUIT", command=sys.exit)
b5.pack(side=RIGHT, anchor=N)

eyeplot.pop_image("pics/g-tof.png", "Gravity by TOF")
root.title("Gravity by Time of Flight")
root.mainloop()
Esempio n. 5
0
b3.pack(side=LEFT, anchor=SW)

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)
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('coupledpend.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/image-name.png', _('Coupled Pendulum Oscillations')
                  )  # save the image in the same directory as of the program
root.title(_('Oscillations of Coupled Pendulums'))
root.mainloop()
Esempio n. 6
0
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()

b3.pack(side = LEFT, anchor = SW)

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)
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('motion.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/image-name.png', _('Study of Linear Motion using Air-Track'))
root.title(_('Study of Linear Motion on Air-Track'))
root.mainloop()
Esempio n. 8
0
e1.pack(side=TOP, anchor=W)
NMAX.set('10')
b1 = Button(cf, text=_('START'), command=pen.start)
b1.pack(side=TOP, anchor=W)
b1 = Button(cf, text=_('STOP'), command=pen.stop)
b1.pack(side=TOP, anchor=W)
b4 = Button(cf, text=_('CLEAR'), command=pen.clear)
b4.pack(side=TOP, anchor=W)
b3 = Button(cf, text=_('SAVE to'), command=pen.save)
b3.pack(side=TOP, anchor=W)
filename = StringVar()
e1 = Entry(cf, width=10, bg='white', textvariable=filename)
filename.set('photogate.dat')
e1.pack(side=TOP)
b1 = Button(cf, text=_('Xmgrace'), command=pen.xmgrace)
b1.pack(side=TOP, anchor=W)
b5 = Button(cf, text=_('QUIT'), command=sys.exit)
b5.pack(side=TOP, anchor=W)

Result = Text(top, width=15, height=16)  # make plot objects using draw.disp
Result.pack(side=LEFT)

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/xyz.png', _('xyz'))
root.title(_('EYES Junior: Photogate'))
root.mainloop()
Esempio n. 9
0
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('lediv.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/LED_iv.png', _('LED IV char. Connections'))

root.title(_('EYES: LED IV characteristics'))
root.mainloop()
Esempio n. 10
0
timebase = Scale(cf,command = set_timebase, orient=HORIZONTAL, length=50, showvalue=False,\
	from_ = 0, to=9, resolution=1)
timebase.pack(side=LEFT, anchor = SW)
timebase.set(0)

b = Button(cf,text =_('5->0V STEP'), command = discharge)
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,'rlc.dat')
b = Button(cf,text =_('QUIT'), command=sys.exit)
b.pack(side=RIGHT, anchor = SW)
b = Button(cf,text =_('Xmgrace'), command=xmgrace)
b.pack(side=RIGHT, anchor = SW)
b4 = Button(cf, text = _('CLEAR'), command = clear)
b4.pack(side = RIGHT, anchor = N)
b4 = Button(cf, text = _('FIT'), command = fit_curve)
b4.pack(side = RIGHT, anchor = N)

mf = Frame(root)				# Message Frame below command frame.
mf.pack(side=TOP, anchor = S)
msgwin = Label(mf,text = _('Messages'), fg = 'blue')
msgwin.pack(side=LEFT, anchor = S, fill=BOTH)
eyeplot.pop_image('pics/LCRcircuit.png', _('RLC Circuit, Transient'))
root.title(_('EYES Junior: RLC Discharge'))
root.mainloop()

Esempio n. 11
0
def get_tof():
    t = p.pulse2rtime(1, 2)
    if t > 0:
        res.config(text=_('%8.6f sec') % (t * 1.0e-6))
    else:
        res.config(text=_('Error..'))


p = eyes.open()
p.disable_actions()

root = Tk()
cf = Frame(root)
cf.pack(side=TOP, fill=BOTH, expand=1)

Label(cf, text=_('Connect Transmitter from OD1 to Ground')).pack()
Label(cf, text=_('Connect Receiver from T15 to Ground')).pack()
Label(cf, text=_('Keep them facing each other, at a known distance')).pack()

b1 = Button(cf, text=_('Measure Time of Travel'), command=get_tof)
b1.pack(side=TOP, anchor=N)
res = Label(cf, text='')
res.pack(side=TOP, anchor=N)
b5 = Button(cf, text=_('QUIT'), command=sys.exit)
b5.pack(side=TOP, anchor=N)

eyeplot.pop_image('pics/xxxxx.png', _('Velocity of Sound, 40kHz'))
root.title(_('Velocity of Sound'))
root.mainloop()
Esempio n. 12
0
WAIT = IntVar()
cb1 = Checkbutton(cf, text=_('Wait for HIGH on IN1'), variable=WAIT, fg='blue')
cb1.pack(side=LEFT, anchor=SW)
WAIT.set(0)

b = Button(cf, text=_('Start Scanning'), command=base_scan)
b.pack(side=LEFT, anchor=SW)
b4 = Button(cf, text=_('CLEAR'), command=clear)
b4.pack(side=LEFT, anchor=N)
b = Button(cf, text=_('VIEW'), command=viewall)
b.pack(side=LEFT, anchor=SW)
b = Button(cf, text=_('XmGrace'), command=xmgrace)
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=LEFT, 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-burst.png', _('Capture a burst of sound'))
root.title(_('EYESJUN: Capturing burst of sound'))
root.mainloop()
Esempio n. 13
0
Npoints = StringVar()
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()
Esempio n. 14
0
e1.pack(side = LEFT)

cf = Frame(root, width = WIDTH, height = 10)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
b1 = Button(cf, text = _('Xmgrace'), command = pen.xmgrace)
b1.pack(side = LEFT, anchor = N)

'''
b1 = Button(cf, text = 'Histogram', command = pen.hist)
b1.pack(side = LEFT, anchor = N)
NBIN = StringVar()
e1 =Entry(cf, width=3, bg = 'white', textvariable = NBIN)
NBIN.set('2')
e1.pack(side = LEFT)
b3 = Label(cf, text = 'bins.')
b3.pack(side = LEFT, anchor = SW)
'''

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/rodpend.png', _('Period of Rod Pendulum'))
root.title(_('EYES: Value of Accn. due to gravity using Pendulum'))
root.mainloop()

Esempio n. 15
0
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()

Esempio n. 16
0
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('freq-response.dat')
e1.pack(side = LEFT)
R = Label(cf,text=_('Fmax = '))
R.pack(side=LEFT)
b5 = Button(cf, text = _('QUIT'), command = quit)
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=_('Connect Piezo from SQR1 to GND. Microphone to 16,15 & 31. Wire from 13 to 26'), fg = 'blue')
msg.pack(side=LEFT)

eyeplot.pop_image('pics/sound.png', _('Frequency Response Curve'))
root.title(_('Audio Frequency response Curve'))
root.mainloop()

Esempio n. 17
0
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()

Esempio n. 18
0
RUN = IntVar()
RS = Checkbutton(cf,text =_('START'), command = start, variable= RUN, fg = 'blue')
RS.pack(side=LEFT, anchor = SW)
RUN.set(0)

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-beats.png', _('Sound Interference'))
root.title(_('EYES: Interference of Sound'))
root.mainloop()

b3.pack(side = LEFT, anchor = SW)

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)
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('coupledpend.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/image-name.png', _('Coupled Pendulum Oscillations'))  # save the image in the same directory as of the program
root.title(_('Oscillations of Coupled Pendulums'))
root.mainloop()
Esempio n. 20
0
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('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/phtran-ce.png', _('Photo Transistor CE Char.'))
root.title(_('EYES: Photo-transistor CE characteristics'))
root.mainloop()

Esempio n. 21
0
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('freq-response.dat')
e1.pack(side=LEFT)
R = Label(cf, text=_('Fmax = '))
R.pack(side=LEFT)
b5 = Button(cf, text=_('QUIT'), command=quit)
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=
    _('Connect Piezo from SQR1 to GND. Microphone to 16,15 & 31. Wire from 13 to 26'
      ),
    fg='blue')
msg.pack(side=LEFT)

eyeplot.pop_image('pics/freq-resp.png', _('Frequency Response Curve'))
root.title(_('Audio Frequency response Curve'))
root.mainloop()
Esempio n. 22
0
SetP = Entry(cf, width=6, bg='white', textvariable=SETP)
SetP.pack(side=LEFT, anchor=SW)
Tlab = Label(cf, text=_('deg C'))
Tlab.pack(side=LEFT, anchor=SW)

b1 = Button(cf, text=_('START'), command=pt.start)
b1.pack(side=LEFT, anchor=N)
b1 = Button(cf, text=_('STOP'), command=pt.stop)
b1.pack(side=LEFT, anchor=N)
b4 = Button(cf, text=_('CLEAR'), command=pt.clear)
b4.pack(side=LEFT, anchor=N)
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('tempcon.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/temp-control.png', _('Temperature Controller (LM35)'))
root.title(_('Temperature controller using LM35'))
root.mainloop()
Esempio n. 23
0
cb1 = Checkbutton(cf,text =_('Wait for HIGH on IN1'), variable=WAIT, fg = 'blue')
cb1.pack(side=LEFT, anchor = SW)
WAIT.set(0)

b = Button(cf,text =_('Start Scanning'), command= base_scan)
b.pack(side=LEFT, anchor = SW)
b4 = Button(cf, text = _('CLEAR'), command = clear)
b4.pack(side = LEFT, anchor = N)
b = Button(cf,text =_('VIEW'), command=viewall)
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('XmGrace'), command=xmgrace)
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=LEFT, 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-burst.png', _('Capture a burst of sound'))
root.title(_('EYESJUN: Capturing burst of sound'))
root.mainloop()

Esempio n. 24
0
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('freq-response.dat')
e1.pack(side=LEFT)
R = Label(cf, text=_('Fmax = '))
R.pack(side=LEFT)
b5 = Button(cf, text=_('QUIT'), command=quit)
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=plotdata)
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=
    _('Connect Piezo from SQR1 to GND. Microphone to 16,15 & 31. Wire from 13 to 26'
      ),
    fg='blue')
msg.pack(side=LEFT)

eyeplot.pop_image('pics/sound.png', _('Frequency Response Curve'))
root.title(_('Audio Frequency response Curve'))
root.mainloop()
Esempio n. 25
0
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()
Esempio n. 26
0
f.pack(side=TOP)
Label(f, text = _('Enter the Capacitance connected to IN1')).pack(side=LEFT)
Cval = StringVar()
Cin = Entry(f, width=6, textvariable = Cval)
Cin.pack(side=LEFT)
#Cval.set('980')
Label(f, text = _('pF')).pack(side=LEFT)
Button(root,text = _("and Click Here to Calibrate IN1"), command = save_calibcap).pack(side = TOP)
separator = Frame(height=2, bd=1, relief=SUNKEN)
separator.pack(fill=X, padx=5, pady=5)

msgwin = Label(root, text = '')
msgwin.pack(side=TOP)
separator = Frame(height=2, bd=1, relief=SUNKEN)
separator.pack(fill=X, padx=5, pady=5)

Button(text = _("Exit"), command = sys.exit).pack(side = TOP)

p = expeyes.eyesj.open()
if p == None:
	root.title(_('EYES Junior Hardware not found'))
eyeplot.pop_image('pics/calibrate.png', _('Calibrate A1 & A2'))

cfvals = _('Existing calibration Data\n')+\
_('Ref=%5.3fV\nm1=%6.3f c1=%6.3f\nm2=%6.3f c2=%6.3f\nIN1: CF=%6.3f Socket=%6.3fpF\n SEN pullup=%6.1fOhm')\
		%(p.refval,p.m12[1], p.c[1],p.m12[2], p.c[2], p.cap_calib, p.socket_cap,p.sen_pullup)
msg(cfvals)
root.title(_('EYES Junior Calibration'))
root.mainloop()

Freq0.insert(END,'100')

l = Label(cf,text='SINE2=')
l.pack(side=LEFT, anchor=SW)
Freq = Entry(cf,width = 10, bg = 'white')
Freq.pack(side=LEFT, anchor = SW)
Freq.insert(END,'200')

Start = Button(cf,text =_('DRAW'), command = start, fg = 'blue')
Start.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,'lissajous.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/lissa.png', _('Lissajous Figures'))
root.title(_('EYES: Lissajous Figuresusing accelerometer'))
root.mainloop()
Esempio n. 28
0
b = Button(cf,text =_('CC Charge'), command= lambda i=2:capture(i))
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('Calculate RC'), command=fit_curve)
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('QUIT'), command=sys.exit)
b.pack(side=RIGHT, anchor = SW)

cf = Frame(root, width = WIDTH, height = 10)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
b = Button(cf,text =_('ViewAll'), command=view_all)
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('Xmgrace'), command=xmgrace)
b.pack(side=LEFT, anchor = SW)
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,'rc.dat')

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/xxxx.png', _(''))
root.title(_('Battery Characteristics'))
root.mainloop()

Esempio n. 29
0
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()

Esempio n. 30
0
def get_tof():
    t = p.pulse2rtime(1, 2)
    if t > 0:
        res.config(text=_('%8.6f sec') % (t * 1.0e-6))
    else:
        res.config(text=_('Error..'))


p = eyes.open()
p.disable_actions()

root = Tk()
cf = Frame(root)
cf.pack(side=TOP, fill=BOTH, expand=1)

Label(cf, text=_('Connect Transmitter from OD1 to Ground')).pack()
Label(cf, text=_('Connect Receiver from T15 to Ground')).pack()
Label(cf, text=_('Keep them facing each other, at a known distance')).pack()

b1 = Button(cf, text=_('Measure Time of Travel'), command=get_tof)
b1.pack(side=TOP, anchor=N)
res = Label(cf, text='')
res.pack(side=TOP, anchor=N)
b5 = Button(cf, text=_('QUIT'), command=sys.exit)
b5.pack(side=TOP, anchor=N)

eyeplot.pop_image('pics/ultra-sound.png', _('Velocity of Sound, 40kHz'))
root.title(_('Velocity of Sound'))
root.mainloop()
Esempio n. 31
0
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/rl-tran.png', _('RL Circuit, Transient'))
root.title(_('Transient response of RL Circuit'))
root.mainloop()
Esempio n. 32
0
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()

cf = Frame(root, width = WIDTH, height = 10)
cf.pack(side=TOP,  fill = BOTH, expand = 1)

cf = Frame(root, width = WIDTH, height = 10)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
e1.pack(side = LEFT)

b3 = Label(cf, text = _(' RED Line - Temperature in Celsius'), fg = 'red')
b3.pack(side = LEFT, anchor = SW)
b3 = Label(cf, text = _('    BLUE Line - Relative Humidity in %'), fg = 'blue') # Add info for other data lines
b3.pack(side = LEFT, anchor = SW)

b5 = Button(cf, text = _('QUIT'), command = pt.quit)
b5.pack(side = RIGHT, anchor = N)
b4 = Button(cf, text = _('CLEAR'), command = pt.clear)
b4.pack(side = RIGHT, anchor = N)
b1 = Button(cf, text = _('STOP'), command = pt.stop)
b1.pack(side = RIGHT, anchor = N)
b1 = Button(cf, text = _('START'), command = pt.start)
b1.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/image-name.png', _('---'))  # save the image in the same directory as of the program
root.title(_('ExpEYES- Weather Station Data Logger'))
root.mainloop()
Esempio n. 34
0

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('lediv.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/LED_iv.png', _('LED IV char. Connections'))

root.title(_('EYES: LED IV characteristics'))
root.mainloop()

Esempio n. 35
0
NMAX.set('10')
b1 = Button(cf, text = _('START'), command = pen.start)
b1.pack(side = TOP, anchor = W)
b1 = Button(cf, text = _('STOP'), command = pen.stop)
b1.pack(side = TOP, anchor = W)
b4 = Button(cf, text = _('CLEAR'), command = pen.clear)
b4.pack(side = TOP, anchor = W)
b3 = Button(cf, text = _('SAVE to'), command = pen.save)
b3.pack(side = TOP, anchor = W)
filename = StringVar()
e1 =Entry(cf, width=10, bg = 'white', textvariable = filename)
filename.set('photogate.dat')
e1.pack(side = TOP)
b1 = Button(cf, text = _('Xmgrace'), command = pen.xmgrace)
b1.pack(side = TOP, anchor = W)
b5 = Button(cf, text = _('QUIT'), command = sys.exit)
b5.pack(side = TOP, anchor = W)

Result = Text(top, width=15, height=16)	# make plot objects using draw.disp
Result.pack(side=LEFT)

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/xyz.png', _('xyz'))
root.title(_('EYES Junior: Photogate'))
root.mainloop()

RUN = IntVar()
RS = Checkbutton(cf,text =_('START'), command = start, variable= RUN, fg = 'blue')
RS.pack(side=LEFT, anchor = SW)
RUN.set(0)

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-beats.png', _('Sound Interference'))
root.title(_('EYES: Interference of Sound'))
root.mainloop()

Esempio n. 37
0
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()
Esempio n. 38
0
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()

Esempio n. 39
0
e1.pack(side=TOP, anchor=W)
NMAX.set('10')
b1 = Button(cf, text=_('START'), command=pen.start)
b1.pack(side=TOP, anchor=W)
b1 = Button(cf, text=_('STOP'), command=pen.stop)
b1.pack(side=TOP, anchor=W)
b4 = Button(cf, text=_('CLEAR'), command=pen.clear)
b4.pack(side=TOP, anchor=W)
b3 = Button(cf, text=_('SAVE to'), command=pen.save)
b3.pack(side=TOP, anchor=W)
filename = StringVar()
e1 = Entry(cf, width=10, bg='white', textvariable=filename)
filename.set('rodpend.dat')
e1.pack(side=TOP)
b1 = Button(cf, text=_('Xmgrace'), command=pen.xmgrace)
b1.pack(side=TOP, anchor=W)
b5 = Button(cf, text=_('QUIT'), command=sys.exit)
b5.pack(side=TOP, anchor=W)

Result = Text(top, width=15, height=16)  # make plot objects using draw.disp
Result.pack(side=LEFT)

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/light-barrier.png', _('Period of a Pendulum'))
root.title(_('EYES Junior: Pendulum'))
root.mainloop()
Esempio n. 40
0
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/tran-ce.png', _('Transistor CE Char (NPN)'))
root.title(_('EYES: Transistor CE characteristics'))
root.mainloop()

def get_tof():
	t = p.pulse2rtime(1,2)
	if t > 0:
		res.config(text = _('%8.6f sec')%(t*1.0e-6))
	else:
		res.config(text = _('Error..'))

p = eyes.open()
p.disable_actions()

root = Tk()
cf = Frame(root)
cf.pack(side=TOP,  fill = BOTH, expand = 1)

Label(cf,text = _('Connect Transmitter from OD1 to Ground')).pack()
Label(cf,text = _('Connect Receiver from T15 to Ground')).pack()
Label(cf,text = _('Keep them facing each other, at a known distance')).pack()

b1 = Button(cf, text = _('Measure Time of Travel'), command = get_tof)
b1.pack(side = TOP, anchor = N)
res = Label(cf, text = '')
res.pack(side = TOP, anchor = N)
b5 = Button(cf, text = _('QUIT'), command = sys.exit)
b5.pack(side = TOP, anchor = N)

eyeplot.pop_image('pics/xxxxx.png', _('Velocity of Sound, 40kHz'))
root.title(_('Velocity of Sound'))
root.mainloop()

Esempio n. 42
0
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('freq-response.dat')
e1.pack(side = LEFT)
R = Label(cf,text=_('Fmax = '))
R.pack(side=LEFT)
b5 = Button(cf, text = _('QUIT'), command = quit)
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=_('Connect Piezo from SQR1 to GND. Microphone to 16,15 & 31. Wire from 13 to 26'), fg = 'blue')
msg.pack(side=LEFT)

eyeplot.pop_image('pics/freq-resp.png', _('Frequency Response Curve'))
root.title(_('Audio Frequency response Curve'))
root.mainloop()

Esempio n. 43
0
def get_tof():
	t = p.pulse2rtime(1,2)
	if t > 0:
		res.config(text = _('%8.6f sec')%(t*1.0e-6))
	else:
		res.config(text = _('Error..'))

p = eyes.open()
p.disable_actions()

root = Tk()
cf = Frame(root)
cf.pack(side=TOP,  fill = BOTH, expand = 1)

Label(cf,text = _('Connect Transmitter from OD1 to Ground')).pack()
Label(cf,text = _('Connect Receiver from T15 to Ground')).pack()
Label(cf,text = _('Keep them facing each other, at a known distance')).pack()

b1 = Button(cf, text = _('Measure Time of Travel'), command = get_tof)
b1.pack(side = TOP, anchor = N)
res = Label(cf, text = '')
res.pack(side = TOP, anchor = N)
b5 = Button(cf, text = _('QUIT'), command = sys.exit)
b5.pack(side = TOP, anchor = N)

eyeplot.pop_image('pics/ultra-sound.png', 'Velocity of Sound, 40kHz')
root.title(_('Velocity of Sound'))
root.mainloop()

Esempio n. 44
0
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/rl-tran.png', _('RL Circuit, Transient'))
root.title(_('Transient response of RL Circuit'))
root.mainloop()

Esempio n. 45
0
g.setWorld(0, 0, vmax, imax, "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("resistor_iv.dat")
e1.pack(side=LEFT)
R = Label(cf, text="R = ")
R.pack(side=LEFT)
b5 = Button(cf, text=_("QUIT"), command=quit)
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/res-measure.png", _("Resistor IV char. Connections"))
root.title(_("EYES: Resistor IV characteristics"))
root.mainloop()
Esempio n. 46
0
b4 = Button(cf, text=_('CLEAR'), command=pt.clear)
b4.pack(side=LEFT, anchor=N)
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')
e1.pack(side=LEFT)
b5 = Button(cf, text=_('QUIT'), command=sys.exit)
b5.pack(side=RIGHT, anchor=N)

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)

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 bt PT100'))
root.title(_('Temperature measuements using PT100'))
root.mainloop()
Esempio n. 47
0
l = Label(cf,text=_('Freq='))
l.pack(side=LEFT, anchor= SW)
Freq = Entry(cf,width = 10, bg = 'white')
Freq.pack(side=LEFT, anchor = SW)
Freq.insert(END,'4000')

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-vel.png', _('Velocity of Sound'))
root.title(_('EYES: Velocity of Sound'))
root.mainloop()

Esempio n. 48
0
Freq0.insert(END,'100')


l = Label(cf,text='SINE2=')
l.pack(side=LEFT, anchor=SW)
Freq = Entry(cf,width = 10, bg = 'white')
Freq.pack(side=LEFT, anchor = SW)
Freq.insert(END,'200')

Start = Button(cf,text =_('DRAW'), command = start, fg = 'blue')
Start.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,'lissajous.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/lissa.png', _('Lissajous Figures'))
root.title(_('EYES: Lissajous Figures'))
root.mainloop()
Esempio n. 49
0
Tlab = Label(cf, text = 'deg C')
Tlab.pack(side = LEFT, anchor = SW)

b1 = Button(cf, text = 'START', command = pt.start)
b1.pack(side = LEFT, anchor = N)
b1 = Button(cf, text = 'STOP', command = pt.stop)
b1.pack(side = LEFT, anchor = N)
b4 = Button(cf, text = 'CLEAR', command = pt.clear)
b4.pack(side = LEFT, anchor = N)
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('tempcon.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/temp-control.png', 'Temperature Controller (LM35)')
root.title('Temperature controller using LM35')
root.mainloop()

else:
        from Tkinter import *

sys.path=[".."] + sys.path

import expeyes.eyesj as eyes
import expeyes.eyeplot as eyeplot
import expeyes.eyemath as eyemath

p=eyes.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()

Esempio n. 51
0
b3.pack(side = LEFT, anchor = SW)
H2 = StringVar()
h =Entry(cf, width=5, bg = 'white', textvariable = H2)
h.pack(side=LEFT)
H2.set('20')
b3 = Label(cf, text = _('cm'))
b3.pack(side = LEFT, anchor = SW)
b1 = Button(cf, text = _('Attach Ball'), command = attach)
b1.pack(side = LEFT, anchor = N)
b1 = Button(cf, text = _('Measure TOF'), command = get_tof2)
b1.pack(side = LEFT, anchor = N)
res2 = Label(cf, text = '')
res2.pack(side = LEFT, anchor = N)

cf = Frame(root)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
b1 = Button(cf, text = _('Calculate "g"'), command = calc_g)
b1.pack(side = LEFT, anchor = N)
'''

mf = Frame(root)
mf.pack(side=TOP,  fill = BOTH, expand = 1)
msgwin = Label(mf,text=_('Message'), fg = 'blue')
msgwin.pack(side=LEFT, anchor = S, fill=BOTH, expand=1)
b5 = Button(cf, text = _('QUIT'), command = sys.exit)
b5.pack(side = RIGHT, anchor = N)

eyeplot.pop_image('pics/g-tof.png', _('Gravity by TOF'))
root.title(_('Gravity by Time of Flight'))
root.mainloop()
Esempio n. 52
0
b1.pack(side=LEFT, anchor=SW)

l = Label(cf, text=_('Freq='))
l.pack(side=LEFT, anchor=SW)
Freq = Entry(cf, width=10, bg='white')
Freq.pack(side=LEFT, anchor=SW)
Freq.insert(END, '3500')

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.png', _('Velocity of Sound'))
root.title(_('EYES Junior: Velocity of Sound'))
root.mainloop()
Esempio n. 53
0
b = Button(cf,text =_('CC Charge'), command= lambda i=2:capture(i))
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('Calculate RC'), command=fit_curve)
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('QUIT'), command=sys.exit)
b.pack(side=RIGHT, anchor = SW)

cf = Frame(root, width = WIDTH, height = 10)
cf.pack(side=TOP,  fill = BOTH, expand = 1)
b = Button(cf,text =_('ViewAll'), command=view_all)
b.pack(side=LEFT, anchor = SW)
b = Button(cf,text =_('Xmgrace'), command=xmgrace)
b.pack(side=LEFT, anchor = SW)
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,'rc.dat')

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/RCcircuit.png', _('RC Circuit, Transient'))
root.title(_('Transient response of RC Circuit'))
root.mainloop()

Esempio n. 54
0
g.setWorld(fmin, 0, fmax, 5.0, _("Freq"), _("Amp"))

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("freq-response.dat")
e1.pack(side=LEFT)
R = Label(cf, text=_("Fmax = "))
R.pack(side=LEFT)
b5 = Button(cf, text=_("QUIT"), command=quit)
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=plotdata)
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=_("Connect Piezo from SQR1 to GND. Microphone to 16,15 & 31. Wire from 13 to 26"), fg="blue")
msg.pack(side=LEFT)

eyeplot.pop_image("pics/sound.png", _("Frequency Response Curve"))
root.title(_("Audio Frequency response Curve"))
root.mainloop()
Esempio n. 55
0
e1 = Entry(cf, width=15, bg='white', textvariable=filename)
filename.set('rodpend.dat')
e1.pack(side=LEFT)

cf = Frame(root, width=WIDTH, height=10)
cf.pack(side=TOP, fill=BOTH, expand=1)
b1 = Button(cf, text=_('Xmgrace'), command=pen.xmgrace)
b1.pack(side=LEFT, anchor=N)
'''
b1 = Button(cf, text = _('Histogram'), command = pen.hist)
b1.pack(side = LEFT, anchor = N)
NBIN = StringVar()
e1 =Entry(cf, width=3, bg = 'white', textvariable = NBIN)
NBIN.set('2')
e1.pack(side = LEFT)
b3 = Label(cf, text = _('bins.'))
b3.pack(side = LEFT, anchor = SW)
'''

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/rodpend.png', _('Period of Rod Pendulum'))
root.title(_('EYES: Value of Accn. due to gravity using Pendulum'))
root.mainloop()
Esempio n. 56
0
ZEN = IntVar()
cb0 = Checkbutton(cf,text =_('ZENER'), variable=ZEN, fg = 'black')
cb0.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('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()

Esempio n. 57
0
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)
#---------------

eyeplot.pop_image('pics/ac-circuits.png', _('Study of AC Circuit'))
root.title(_('Study of AC Circuits'))
root.after(10,update)
root.mainloop()

# Local Variables:
# python-indent: 4
# End: