Quantcast
Channel: Support - Pimoroni Buccaneers
Viewing all articles
Browse latest Browse all 6857

GPIO.add.event.detect alternative for Automation Hat input

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 6857

Trending Articles