示例#1
0
def playSelection(event):
  selection = int(tone_listbox.curselection()[0])
  if selection == 0:
    noTone(PWM1)
  elif selection < 10:
    tone(PWM1, selection*100)
  else:
    noTone(PWM1)
示例#2
0
def playSelection(event):
  selection = int(tone_listbox.curselection()[0])
  if selection == 0:
    noTone(PWM1)
  elif selection < 10:
    tone(PWM1, selection*100)
  else:
    noTone(PWM1)
示例#3
0
文件: piezo.py 项目: lmasson/ADCS
def printselection(event):
  global mylist
  selection = int(mylist.curselection()[0])
  if selection == 0:
    noTone(PWM1)
  elif selection < 10:
    tone(PWM1, selection*100, 100)
  else:
    noTone(PWM1)