Skip to content

Commit 44e2e1d

Browse files
committed
button to IRQ_FALLING
1 parent dc58076 commit 44e2e1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

10.microbit/button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Button:
55
def __init__(self, pin_id):
66
from machine import Pin
77
self.pin = Pin(pin_id, Pin.IN)
8-
self.irq = self.pin.irq(trigger=Pin.IRQ_RISING, handler=self.__irq_sc)
8+
self.irq = self.pin.irq(trigger=Pin.IRQ_FALLING, handler=self.__irq_sc)
99
self.presses = 0
1010

1111
def __irq_sc(self, p):

0 commit comments

Comments
 (0)