This commit is contained in:
Benjamin Tayehanpour 2026-09-26 21:38:08 +00:00
parent 984343755f
commit e99a095815

View file

@ -9,5 +9,5 @@ class button:
async def start(self):
await self.pi.set_mode(self.gpio, asyncpio.INPUT)
await self.pi.set_pull_up_down(self.gpio, asyncpio.PUD_UP)
self.pi.set_glitch_filter(self.gpio, 20000)
await self.pi.set_glitch_filter(self.gpio, 20000)
self.cb = await self.pi.callback(self.gpio, asyncpio.EITHER_EDGE, self.callback)