We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e53b501 commit 7c650a3Copy full SHA for 7c650a3
internal_filesystem/builtin/system/button.py
@@ -8,7 +8,7 @@
8
button = Pin(0, Pin.IN, Pin.PULL_UP)
9
10
# Variables for long press detection
11
-long_press_duration = 4000
+long_press_duration = 3000
12
press_start_time = 0
13
is_pressed = False
14
@@ -30,6 +30,7 @@ def handle_long_press():
30
machine.bootloader()
31
32
def on_long_press(t): # Callback for when long press duration is reached.
33
+ print("button.py: long press detected")
34
global timer
35
timer.deinit() # Stop the timer
36
global is_pressed
0 commit comments