Exemple #1
0
def buttonfunction(index):
    for i in range(Nbuttons):
        buttons[i].config(state="disabled")
    if index == 0:
        demoscope3.scope()
    elif index == 1:
        demoscope3.storedata(300)
    elif index == 2:
        demoscope3.plotsignal()
    elif index == 3:
        demoscope3.plotfourier()
    elif index == 4:
        demoscope3.plothistogram()
    elif index == 5:
        demoscope3.activar_envio('Galv+Sharp')
    elif index == 6:
        demoscope3.activar_envio('Pasos+Sharp')
    elif index == 7:
        demoscope3.activar_envio('Galv+Cnt')
    elif index == 8:
        demoscope3.alejar()
    elif index == 9:
        demoscope3.acercar()
    elif index == 10:
        demoscope3.move_noria(input('Obstaculo -> '))
    elif index == 11:
        os.system('clear')
        exit()
    for i in range(Nbuttons):
        buttons[i].config(state="active")
Exemple #2
0
def buttonfunction(index):
    for i in range(Nbuttons):
        buttons[i].config(state="disabled")
    if index == 0:
        demoscope3.scope()
    elif index == 1:
        demoscope3.storedata(300)
    elif index == 2:
        demoscope3.plotsignal()
    elif index == 3:
        demoscope3.plotfourier()
    elif index == 4:
        demoscope3.plothistogram()
    elif index == 5:
        os.system('clear')
        exit()
    for i in range(Nbuttons):
        buttons[i].config(state="active")