Explorer hat touch.held - Raspberry Pi


#1

Hi,

Explorerhat on raspberry pi B+, Pyton 3
I have difficulty explorer hat.touch.held.
See also code below.
when running this script the pressed and release is called but the held is never called, even when I hold touch the key for several seconds.

Any reason why this would not work?

Thanks for any suggestions.

import explorerhat

def indrukken(channel, event):
print(“indrukken”)

def lossen(channel, event):
print(“lossen”)

def vasthouden(channel, event):
print(“vasthouden”)

explorerhat.touch.pressed(indrukken)
explorerhat.touch.held(vasthouden)
explorerhat.touch.released(lossen)

while 1 == 1:
i = 0