Update tap.py
This commit is contained in:
parent
6547d12093
commit
7c32293189
6
tap.py
6
tap.py
@ -1,10 +1,6 @@
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# Create a small widget that calculates BPM based on mouse clicks or space bar taps
|
|
||||||
# The widget should have a label that displays the current BPM
|
|
||||||
# The widget should have a button that starts and stops the BPM calculation
|
|
||||||
|
|
||||||
click_times = [] # to store click times
|
click_times = [] # to store click times
|
||||||
bpm = 0 # to store bpm
|
bpm = 0 # to store bpm
|
||||||
running = False # to store if the widget is running
|
running = False # to store if the widget is running
|
||||||
@ -59,4 +55,4 @@ start_stop_button.pack(pady=20)
|
|||||||
root.bind("<Button>", handle_click)
|
root.bind("<Button>", handle_click)
|
||||||
root.bind("<Key>", handle_click)
|
root.bind("<Key>", handle_click)
|
||||||
|
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user