Skip to content

Commit

Permalink
Merge pull request #1043 from isaac-webb/main
Browse files Browse the repository at this point in the history
Fix Button class on Pico 2W
  • Loading branch information
Gadgetoid authored Jan 8, 2025
2 parents e8260bf + 9883943 commit 324b15a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micropython/modules_py/pimoroni.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, button, invert=True, repeat_time=200, hold_time=1000):
self.invert = invert
self.repeat_time = repeat_time
self.hold_time = hold_time
self.pin = Pin(button, pull=Pin.PULL_UP if invert else Pin.PULL_DOWN)
self.pin = Pin(button, Pin.IN, Pin.PULL_UP if invert else Pin.PULL_DOWN)
self.last_state = False
self.pressed = False
self.pressed_time = 0
Expand Down

0 comments on commit 324b15a

Please sign in to comment.