I´m new newbie in programming Automation Hat in Python, and I would like to know how/or with replace GPIO.add.event.detect command in my python program? I have set some def and I want callback this event when I press button connected to Hat input.
I try while cycle, but this is unsuitable for me, because I want get signal just once to def.
I want something like this when I using GPIO:
my def subprogram