@k.machacek wrote:
Hello,
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:def pressbutton(channel):
my def subprogram
.
.
.
GPIO.add_event_detect(8,GPIO.BOTH,callback=pressbutton)
Posts: 1
Participants: 1